summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_dpt.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2023-03-20 11:05:21 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2023-03-24 23:56:35 +0200
commitc5de248484afeb6de259239a23645790038d9df3 (patch)
tree828a96a5142a3edcbff126f601e9c5d23c4f447d /drivers/gpu/drm/i915/display/intel_dpt.c
parent5a08585d38d66dd64b8ae22229bdfae3fdc1ef3e (diff)
drm/i915/dpt: Add a modparam to disable DPT via the chicken bit
Add i915.enable_dpt modparam to allow disabling the DPT usage in hardware via the chicken bit. Useful when debugging potential DPT issues. Quickly smoke tested on ADL. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230320090522.9909-6-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_dpt.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_dpt.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dpt.c b/drivers/gpu/drm/i915/display/intel_dpt.c
index 2a9f40a2b3ed..2bf5cce232d5 100644
--- a/drivers/gpu/drm/i915/display/intel_dpt.c
+++ b/drivers/gpu/drm/i915/display/intel_dpt.c
@@ -9,6 +9,8 @@
#include "gt/gen8_ppgtt.h"
#include "i915_drv.h"
+#include "i915_reg.h"
+#include "intel_de.h"
#include "intel_display_types.h"
#include "intel_dpt.h"
#include "intel_fb.h"
@@ -313,3 +315,22 @@ void intel_dpt_destroy(struct i915_address_space *vm)
dpt->obj->is_dpt = false;
i915_vm_put(&dpt->vm);
}
+
+void intel_dpt_configure(struct intel_crtc *crtc)
+{
+ struct drm_i915_private *i915 = to_i915(crtc->base.dev);
+
+ if (DISPLAY_VER(i915) == 14) {
+ enum pipe pipe = crtc->pipe;
+ enum plane_id plane_id;
+
+ for_each_plane_id_on_crtc(crtc, plane_id)
+ intel_de_rmw(i915, PLANE_CHICKEN(pipe, plane_id),
+ PLANE_CHICKEN_DISABLE_DPT,
+ i915->params.enable_dpt ? 0 : PLANE_CHICKEN_DISABLE_DPT);
+ } else if (DISPLAY_VER(i915) == 13) {
+ intel_de_rmw(i915, CHICKEN_MISC_2,
+ CHICKEN_MISC_DISABLE_DPT,
+ i915->params.enable_dpt ? 0 : CHICKEN_MISC_DISABLE_DPT);
+ }
+}