diff options
| author | Clarence Ip <cip@codeaurora.org> | 2017-06-13 10:16:07 -0400 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-10-23 18:57:56 -0700 |
| commit | ce46ccdb6ddddc9e0bcbdc6953db3dae9c901d84 (patch) | |
| tree | 513a7ccc7978a6155aa44018ca8bcb25704048fc /drivers | |
| parent | d8bc349f5414150a5d59ea73b2d0a2b1fa270043 (diff) | |
drm/msm/sde: ignore scaler v2 data if not enabled
The incoming scaler v2 user data isn't guaranteed to be
valid if the 'enable' field is set to zero, so ignore
the entire structure unless the enable is explicitly set
to a non-zero value.
CRs-Fixed: 2052501
Change-Id: Ieeb24122a5caffcd7361007e52219cee94e33eee
Signed-off-by: Clarence Ip <cip@codeaurora.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/drm/msm/sde/sde_plane.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_plane.c b/drivers/gpu/drm/msm/sde/sde_plane.c index ff5307160f79..e50577e3eb4b 100644 --- a/drivers/gpu/drm/msm/sde/sde_plane.c +++ b/drivers/gpu/drm/msm/sde/sde_plane.c @@ -2143,6 +2143,12 @@ static inline void _sde_plane_set_scaler_v2(struct sde_phy_plane *pp, return; } + /* detach/ignore user data if 'disabled' */ + if (!scale_v2.enable) { + SDE_DEBUG_PLANE(psde, "scale data removed\n"); + return; + } + /* populate from user space */ pe = &(pp->pixel_ext); memset(pe, 0, sizeof(struct sde_hw_pixel_ext)); |
