drm/amd/display: Fill prescale_params->scale for RGB565
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tue, 16 Apr 2019 14:30:29 +0000 (10:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 May 2019 17:20:49 +0000 (12:20 -0500)
[Why]
An assertion is thrown when using SURFACE_PIXEL_FORMAT_GRPH_RGB565
formats on DCE since the prescale_params->scale wasn't being filled.

Found by a dmesg-fail when running the
igt@kms_plane@pixel-format-pipe-a-planes test on Baffin.

[How]
Fill in the scale parameter.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index 7ac50ab1b7620804b6e59063efbc288f19b96bcb..7d7e93c87c282f5de4219f0c06fc6caa5e39377b 100644 (file)
@@ -242,6 +242,9 @@ static void build_prescale_params(struct ipp_prescale_params *prescale_params,
        prescale_params->mode = IPP_PRESCALE_MODE_FIXED_UNSIGNED;
 
        switch (plane_state->format) {
+       case SURFACE_PIXEL_FORMAT_GRPH_RGB565:
+               prescale_params->scale = 0x2082;
+               break;
        case SURFACE_PIXEL_FORMAT_GRPH_ARGB8888:
        case SURFACE_PIXEL_FORMAT_GRPH_ABGR8888:
                prescale_params->scale = 0x2020;