[Intel-gfx] [PATCH v3 16/18] drm/i915: move quirks under display sub-struct
Jani Nikula
jani.nikula at intel.com
Mon Aug 29 13:18:23 UTC 2022
Move display quirk related members under drm_i915_private display
sub-struct.
Prefer adding anonymous sub-structs even for single members that aren't
our own structs.
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
drivers/gpu/drm/i915/display/intel_display_core.h | 4 ++++
drivers/gpu/drm/i915/display/intel_quirks.c | 4 ++--
drivers/gpu/drm/i915/i915_drv.h | 1 -
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
index 31fd05a04bff..577ab7765fa9 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -365,6 +365,10 @@ struct intel_display {
struct mutex mutex;
} pps;
+ struct {
+ unsigned long mask;
+ } quirks;
+
struct {
enum {
I915_SAGV_UNKNOWN = 0,
diff --git a/drivers/gpu/drm/i915/display/intel_quirks.c b/drivers/gpu/drm/i915/display/intel_quirks.c
index 41caeda795cb..6e48d3bcdfec 100644
--- a/drivers/gpu/drm/i915/display/intel_quirks.c
+++ b/drivers/gpu/drm/i915/display/intel_quirks.c
@@ -11,7 +11,7 @@
static void intel_set_quirk(struct drm_i915_private *i915, enum intel_quirk_id quirk)
{
- i915->quirks |= BIT(quirk);
+ i915->display.quirks.mask |= BIT(quirk);
}
/*
@@ -224,5 +224,5 @@ void intel_init_quirks(struct drm_i915_private *i915)
bool intel_has_quirk(struct drm_i915_private *i915, enum intel_quirk_id quirk)
{
- return i915->quirks & BIT(quirk);
+ return i915->display.quirks.mask & BIT(quirk);
}
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index c486a1dcfb07..47f2629da226 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -291,7 +291,6 @@ struct drm_i915_private {
unsigned short pch_id;
unsigned long gem_quirks;
- unsigned long quirks;
struct drm_atomic_state *modeset_restore_state;
struct drm_modeset_acquire_ctx reset_ctx;
--
2.34.1
More information about the Intel-gfx
mailing list