drm/msm/sde: allow forcing of kernel scaler calculation
This patch adds a debugfs entry to the planes to force the driver to ignore any custom scaler configuration from the user space. CRs-Fixed: 2019305 Change-Id: I98596a1aaa0629ca1bfe81ab5c01a0d7854859e3 Signed-off-by: Clarence Ip <cip@codeaurora.org>
This commit is contained in:
parent
e9e11292d7
commit
1331c9a856
1 changed files with 10 additions and 2 deletions
|
@ -138,6 +138,7 @@ struct sde_plane {
|
|||
struct sde_debugfs_regset32 debugfs_src;
|
||||
struct sde_debugfs_regset32 debugfs_scaler;
|
||||
struct sde_debugfs_regset32 debugfs_csc;
|
||||
bool debugfs_default_scale;
|
||||
};
|
||||
|
||||
#define to_sde_plane(x) container_of(x, struct sde_plane, base)
|
||||
|
@ -734,6 +735,7 @@ static void _sde_plane_setup_scaler3(struct sde_phy_plane *pp,
|
|||
}
|
||||
|
||||
memset(scale_cfg, 0, sizeof(*scale_cfg));
|
||||
memset(&pp->pixel_ext, 0, sizeof(struct sde_hw_pixel_ext));
|
||||
|
||||
decimated = DECIMATED_DIMENSION(src_w,
|
||||
pp->pipe_cfg.horz_decimation);
|
||||
|
@ -1081,7 +1083,8 @@ static void _sde_plane_setup_scaler(struct sde_phy_plane *pp,
|
|||
int error;
|
||||
|
||||
error = _sde_plane_setup_scaler3_lut(pp, pstate);
|
||||
if (error || !pp->pixel_ext_usr) {
|
||||
if (error || !pp->pixel_ext_usr ||
|
||||
psde->debugfs_default_scale) {
|
||||
memset(pe, 0, sizeof(struct sde_hw_pixel_ext));
|
||||
/* calculate default config for QSEED3 */
|
||||
_sde_plane_setup_scaler3(pp,
|
||||
|
@ -1092,7 +1095,8 @@ static void _sde_plane_setup_scaler(struct sde_phy_plane *pp,
|
|||
pp->scaler3_cfg, fmt,
|
||||
chroma_subsmpl_h, chroma_subsmpl_v);
|
||||
}
|
||||
} else if (!pp->pixel_ext_usr || !pstate) {
|
||||
} else if (!pp->pixel_ext_usr || !pstate ||
|
||||
psde->debugfs_default_scale) {
|
||||
uint32_t deci_dim, i;
|
||||
|
||||
/* calculate default configuration for QSEED2 */
|
||||
|
@ -2593,6 +2597,10 @@ static void _sde_plane_init_debugfs(struct sde_plane *psde,
|
|||
sde_debugfs_create_regset32("scaler_blk", S_IRUGO,
|
||||
psde->debugfs_root,
|
||||
&psde->debugfs_scaler);
|
||||
debugfs_create_bool("default_scaling",
|
||||
0644,
|
||||
psde->debugfs_root,
|
||||
&psde->debugfs_default_scale);
|
||||
|
||||
sde_debugfs_setup_regset32(&psde->debugfs_csc,
|
||||
sblk->csc_blk.base + cfg->base,
|
||||
|
|
Loading…
Add table
Reference in a new issue