From 1971601fbdb5518b7b9d5c4ab473aacda9901e15 Mon Sep 17 00:00:00 2001 From: Ping Li Date: Thu, 17 Jun 2021 16:29:11 -0700 Subject: [PATCH] disp: msm: sde: assign correct size for sspp color proc feature data Instead of hard coding the size of the blob data, pass the exact size retrieved from drm property framework to color processing layer. Color processing layer has size check to make sure the blob data size matches the expected size. Change-Id: I277f9be1ba84e4e4707847756a9ed0ea1ed23f53 Signed-off-by: Ping Li --- msm/sde/sde_plane.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/msm/sde/sde_plane.c b/msm/sde/sde_plane.c index d1c0af05c8..193ecee610 100644 --- a/msm/sde/sde_plane.c +++ b/msm/sde/sde_plane.c @@ -1215,7 +1215,7 @@ static void sde_color_process_plane_setup(struct drm_plane *plane) PLANE_PROP_VIG_GAMUT); hw_cfg.last_feature = 0; hw_cfg.ctl = ctl; - hw_cfg.len = sizeof(struct drm_msm_3d_gamut); + hw_cfg.len = size; hw_cfg.payload = vig_gamut; psde->pipe_hw->ops.setup_vig_gamut(psde->pipe_hw, &hw_cfg); } @@ -1228,7 +1228,7 @@ static void sde_color_process_plane_setup(struct drm_plane *plane) PLANE_PROP_VIG_IGC); hw_cfg.last_feature = 0; hw_cfg.ctl = ctl; - hw_cfg.len = sizeof(struct drm_msm_igc_lut); + hw_cfg.len = size; hw_cfg.payload = igc; psde->pipe_hw->ops.setup_vig_igc(psde->pipe_hw, &hw_cfg); } @@ -1241,7 +1241,7 @@ static void sde_color_process_plane_setup(struct drm_plane *plane) PLANE_PROP_DMA_IGC); hw_cfg.last_feature = 0; hw_cfg.ctl = ctl; - hw_cfg.len = sizeof(struct drm_msm_igc_lut); + hw_cfg.len = size; hw_cfg.payload = igc; psde->pipe_hw->ops.setup_dma_igc(psde->pipe_hw, &hw_cfg, pstate->multirect_index); @@ -1255,7 +1255,7 @@ static void sde_color_process_plane_setup(struct drm_plane *plane) PLANE_PROP_DMA_GC); hw_cfg.last_feature = 0; hw_cfg.ctl = ctl; - hw_cfg.len = sizeof(struct drm_msm_pgc_lut); + hw_cfg.len = size; hw_cfg.payload = gc; psde->pipe_hw->ops.setup_dma_gc(psde->pipe_hw, &hw_cfg, pstate->multirect_index);