Message ID | 20210604131634.6703-2-wse@tuxedocomputers.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/amd/display: Add missing cases | expand |
On 2021-06-04 9:16 a.m., Werner Sembach wrote: > convert_dc_color_depth_into_bpc() that converts the enum dc_color_depth to an > integer had the cases for COLOR_DEPTH_999 and COLOR_DEPTH_111111 missing. > > Signed-off-by: Werner Sembach <wse@tuxedocomputers.com> > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > index 389eff96fcf6..6e82889271d5 100644 > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c > @@ -6515,6 +6515,10 @@ static int convert_dc_color_depth_into_bpc (enum dc_color_depth display_color_de > return 14; > case COLOR_DEPTH_161616: > return 16; > + case COLOR_DEPTH_999: > + return 9; > + case COLOR_DEPTH_111111: > + return 11; The color_depth returned by convert_color_depth_from_display_info will never return 9 or 11 bpc color depth. If we add these we should add them in all places where they're needed and test the whole sequence. I'm a bit surprised to find DC has support for 9 bpc and 11 bpc color depth but am not sure how well tested that is. Harry > default: > break; > } >
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 389eff96fcf6..6e82889271d5 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6515,6 +6515,10 @@ static int convert_dc_color_depth_into_bpc (enum dc_color_depth display_color_de return 14; case COLOR_DEPTH_161616: return 16; + case COLOR_DEPTH_999: + return 9; + case COLOR_DEPTH_111111: + return 11; default: break; }
convert_dc_color_depth_into_bpc() that converts the enum dc_color_depth to an integer had the cases for COLOR_DEPTH_999 and COLOR_DEPTH_111111 missing. Signed-off-by: Werner Sembach <wse@tuxedocomputers.com> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++ 1 file changed, 4 insertions(+)