summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorClarence Ip <cip@codeaurora.org>2016-05-26 01:16:15 -0400
committerDhaval Patel <pdhaval@codeaurora.org>2016-08-01 11:58:09 -0700
commite1139cc05e85ddc3b26868b724ca4ce6166d7615 (patch)
treed8bd913d963473671e57e5c8cb6541c713c0578f /drivers/gpu
parentb7111a060e84bdad5d010e3eef2f5e25f98f8c8f (diff)
drm/msm/sde: remove plane decimation properties
Use decimation definition within scaler blob instead. Change-Id: I7814d3a777974514c0a539721622500dd7828b4f Signed-off-by: Clarence Ip <cip@codeaurora.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/msm/msm_drv.h2
-rw-r--r--drivers/gpu/drm/msm/sde/sde_plane.c36
2 files changed, 13 insertions, 25 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index 607767a32da8..5cd3155b2fc4 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -81,8 +81,6 @@ enum msm_mdp_plane_property {
/* range properties */
PLANE_PROP_ZPOS = PLANE_PROP_BLOBCOUNT,
PLANE_PROP_ALPHA,
- PLANE_PROP_H_DECIMATE,
- PLANE_PROP_V_DECIMATE,
PLANE_PROP_SYNC_FENCE,
/* enum/bitmask properties */
diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c
index a19cd515ea86..77af9697138f 100644
--- a/drivers/gpu/drm/msm/sde/sde_plane.c
+++ b/drivers/gpu/drm/msm/sde/sde_plane.c
@@ -434,12 +434,6 @@ static int _sde_plane_mode_set(struct drm_plane *plane,
_sde_plane_set_scanout(plane, pstate, &psde->pipe_cfg, fb);
- /* decimation */
- psde->pipe_cfg.horz_decimation =
- sde_plane_get_property(pstate, PLANE_PROP_H_DECIMATE);
- psde->pipe_cfg.vert_decimation =
- sde_plane_get_property(pstate, PLANE_PROP_V_DECIMATE);
-
/* flags */
DBG("Flags 0x%llX, rotation 0x%llX",
sde_plane_get_property(pstate, PLANE_PROP_SRC_CONFIG),
@@ -470,12 +464,6 @@ static int _sde_plane_mode_set(struct drm_plane *plane,
/* get sde pixel format definition */
fmt = psde->pipe_cfg.src.format;
- /* don't chroma subsample if decimating */
- chroma_subsmpl_h = psde->pipe_cfg.horz_decimation ? 1 :
- drm_format_horz_chroma_subsampling(pix_format);
- chroma_subsmpl_v = psde->pipe_cfg.vert_decimation ? 1 :
- drm_format_vert_chroma_subsampling(pix_format);
-
pe = &(psde->pixel_ext);
memset(pe, 0, sizeof(struct sde_hw_pixel_ext));
@@ -496,6 +484,18 @@ static int _sde_plane_mode_set(struct drm_plane *plane,
}
}
+ /* decimation */
+ if (sc_u1 && (sc_u1->enable & SDE_DRM_SCALER_DECIMATE)) {
+ psde->pipe_cfg.horz_decimation = sc_u1->horz_decimate;
+ psde->pipe_cfg.vert_decimation = sc_u1->vert_decimate;
+ }
+
+ /* don't chroma subsample if decimating */
+ chroma_subsmpl_h = psde->pipe_cfg.horz_decimation ? 1 :
+ drm_format_horz_chroma_subsampling(pix_format);
+ chroma_subsmpl_v = psde->pipe_cfg.vert_decimation ? 1 :
+ drm_format_vert_chroma_subsampling(pix_format);
+
/* update scaler */
if (psde->features & BIT(SDE_SSPP_SCALER_QSEED3)) {
if (sc_u1 && (sc_u1->enable & SDE_DRM_SCALER_SCALER_3))
@@ -900,16 +900,6 @@ static void _sde_plane_install_properties(struct drm_plane *plane,
_sde_plane_install_range_property(plane, dev, "alpha", 0, 255, 255,
&(dev_priv->plane_property[PLANE_PROP_ALPHA]));
- /* max range of first pipe will be used */
- _sde_plane_install_range_property(plane, dev, "h_decimate",
- 0, psde->pipe_sblk->maxhdeciexp, 0,
- &(dev_priv->plane_property[PLANE_PROP_H_DECIMATE]));
-
- /* max range of first pipe will be used */
- _sde_plane_install_range_property(plane, dev, "v_decimate",
- 0, psde->pipe_sblk->maxvdeciexp, 0,
- &(dev_priv->plane_property[PLANE_PROP_V_DECIMATE]));
-
_sde_plane_install_range_property(plane, dev, "sync_fence", 0, ~0, 0,
&(dev_priv->plane_property[PLANE_PROP_SYNC_FENCE]));
@@ -917,7 +907,7 @@ static void _sde_plane_install_properties(struct drm_plane *plane,
_sde_plane_install_rotation_property(plane, dev,
&(dev_priv->plane_property[PLANE_PROP_ROTATION]));
- /* enum/bitmask properties */
+ /* enum/bitmask properties */
_sde_plane_install_enum_property(plane, dev, "blend_op", 0,
e_blend_op, ARRAY_SIZE(e_blend_op),
&(dev_priv->plane_property[PLANE_PROP_BLEND_OP]));