mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user