[Intel-gfx] [PATCH 37/39] drm/i915: move quirks under display sub-struct

Lucas De Marchi lucas.demarchi at intel.com
Wed Aug 17 04:49:46 UTC 2022


On Thu, Aug 11, 2022 at 06:07:48PM +0300, Jani Nikula wrote:
>Move display 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>
>---
> 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 da76b3eecbf5..252da61f2c6a 100644
>--- a/drivers/gpu/drm/i915/display/intel_display_core.h
>+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
>@@ -367,6 +367,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 22e0df9d9dba..e74ff042a9da 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);

you started splitting gem from the display, so maybe this could be
intel_display_set_quirk()? similar for other functions


anyway:


Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

until this patch, except patch 5

Lucas De Marchi


More information about the Intel-gfx mailing list