lkml.org 
[lkml]   [2019]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.20 049/352] drm/amd/display: fix gamma not being applied correctly
    Date
    4.20-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    [ Upstream commit 8ce504b9389be846bcdf512ed5be8f661b3bf097 ]

    [why]
    Gamma was always being set as identity on SDR monitor,
    leading to no changes in gamma. This caused nightlight to
    not apply correctly.

    [how]
    Added a default gamma structure to compare against
    in the sdr case.

    Signed-off-by: Murton Liu <murton.liu@amd.com>
    Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
    Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
    index 193184affefb..32e4c653b1b4 100644
    --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
    +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
    @@ -1226,7 +1226,8 @@ static bool dcn10_set_input_transfer_func(struct pipe_ctx *pipe_ctx,
    tf = plane_state->in_transfer_func;

    if (plane_state->gamma_correction &&
    - !plane_state->gamma_correction->is_identity
    + !dpp_base->ctx->dc->debug.always_use_regamma
    + && !plane_state->gamma_correction->is_identity
    && dce_use_lut(plane_state->format))
    dpp_base->funcs->dpp_program_input_lut(dpp_base, plane_state->gamma_correction);

    --
    2.19.1


    \
     
     \ /
      Last update: 2019-02-11 17:12    [W:2.324 / U:0.464 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site