From: Maxime Ripard Date: Mon, 21 Feb 2022 09:59:15 +0000 (+0100) Subject: drm/komeda: plane: Remove redundant color encoding and range initialisation X-Git-Tag: v6.6.17~3937^2~23^2~2965 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e026f2880235025643fd7d68dbe972d544d7f44f;p=platform%2Fkernel%2Flinux-rpi.git drm/komeda: plane: Remove redundant color encoding and range initialisation The komeda KMS driver will call drm_plane_create_color_properties() with a default encoding and range values of BT601 and Limited Range, respectively. Since the initial value wasn't carried over in the state, the driver had to set it again in komeda_plane_reset(). However, the helpers have been adjusted to set it properly at reset, so this is not needed anymore. Cc: Brian Starkey Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Signed-off-by: Maxime Ripard Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20220221095918.18763-20-maxime@cerno.tech --- diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c index 383bb20..541949f 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c @@ -143,11 +143,8 @@ static void komeda_plane_reset(struct drm_plane *plane) plane->state = NULL; state = kzalloc(sizeof(*state), GFP_KERNEL); - if (state) { + if (state) __drm_atomic_helper_plane_reset(plane, &state->base); - state->base.color_encoding = DRM_COLOR_YCBCR_BT601; - state->base.color_range = DRM_COLOR_YCBCR_LIMITED_RANGE; - } } static struct drm_plane_state *