summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/msm/sde/sde_color_processing.c17
-rw-r--r--include/uapi/drm/msm_drm_pp.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/sde/sde_color_processing.c b/drivers/gpu/drm/msm/sde/sde_color_processing.c
index e1b3fbc889ac..8a086dc68328 100644
--- a/drivers/gpu/drm/msm/sde/sde_color_processing.c
+++ b/drivers/gpu/drm/msm/sde/sde_color_processing.c
@@ -444,6 +444,7 @@ static void sde_cp_crtc_setfeature(struct sde_cp_node *prop_node,
struct sde_hw_cp_cfg hw_cfg;
struct sde_hw_mixer *hw_lm;
struct sde_hw_dspp *hw_dspp;
+ struct drm_msm_pa_hsic *hsic_cfg;
u32 num_mixers = sde_crtc->num_mixers;
int i = 0;
bool feature_enabled = false;
@@ -489,6 +490,22 @@ static void sde_cp_crtc_setfeature(struct sde_cp_node *prop_node,
ret = -EINVAL;
continue;
}
+ if (hw_cfg.payload && (hw_cfg.len ==
+ sizeof(struct drm_msm_pa_hsic))) {
+ /* hw_cfg is valid, check for feature flag */
+ hsic_cfg = (struct drm_msm_pa_hsic *)
+ hw_cfg.payload;
+ if ((hsic_cfg->flags &
+ PA_HSIC_LEFT_DISPLAY_ONLY) && (i > 0)) {
+ /* skip right side programming */
+ continue;
+ } else if ((hsic_cfg->flags &
+ PA_HSIC_RIGHT_DISPLAY_ONLY)
+ && (i == 0)) {
+ /* skip left side programming */
+ continue;
+ }
+ }
hw_dspp->ops.setup_pa_hsic(hw_dspp, &hw_cfg);
break;
case SDE_CP_CRTC_DSPP_MEMCOLOR:
diff --git a/include/uapi/drm/msm_drm_pp.h b/include/uapi/drm/msm_drm_pp.h
index 86f29c1601bf..5f5ca0345140 100644
--- a/include/uapi/drm/msm_drm_pp.h
+++ b/include/uapi/drm/msm_drm_pp.h
@@ -56,6 +56,8 @@ struct drm_msm_pa_vlut {
#define PA_HSIC_SAT_ENABLE (1 << 1)
#define PA_HSIC_VAL_ENABLE (1 << 2)
#define PA_HSIC_CONT_ENABLE (1 << 3)
+#define PA_HSIC_LEFT_DISPLAY_ONLY (1 << 4)
+#define PA_HSIC_RIGHT_DISPLAY_ONLY (1 << 5)
/**
* struct drm_msm_pa_hsic - pa hsic feature structure
* @flags: flags for the feature customization, values can be: