[Intel-gfx] [PATCH 09/39] drm/i915: move and group gmbus members under display.gmbus

Lucas De Marchi lucas.demarchi at intel.com
Wed Aug 17 03:56:26 UTC 2022


On Thu, Aug 11, 2022 at 06:07:20PM +0300, Jani Nikula wrote:
>Move display related members under drm_i915_private display sub-struct.
>
>Signed-off-by: Jani Nikula <jani.nikula at intel.com>
>---
> drivers/gpu/drm/i915/display/intel_cdclk.c    |  6 +--
> .../gpu/drm/i915/display/intel_display_core.h | 23 ++++++++++
> drivers/gpu/drm/i915/display/intel_dp_aux.c   |  2 +-
> drivers/gpu/drm/i915/display/intel_gmbus.c    | 46 +++++++++----------
> drivers/gpu/drm/i915/i915_drv.h               | 16 -------
> drivers/gpu/drm/i915/i915_irq.c               |  4 +-
> drivers/gpu/drm/i915/i915_reg.h               | 14 +++---
> 7 files changed, 59 insertions(+), 52 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
>index 6095f5800a2e..ea40c75c2986 100644
>--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
>+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
>@@ -2098,12 +2098,12 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv,
> 	 * functions use cdclk. Not all platforms/ports do,
> 	 * but we'll lock them all for simplicity.
> 	 */
>-	mutex_lock(&dev_priv->gmbus_mutex);
>+	mutex_lock(&dev_priv->display.gmbus.mutex);
> 	for_each_intel_dp(&dev_priv->drm, encoder) {
> 		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
>
> 		mutex_lock_nest_lock(&intel_dp->aux.hw_mutex,
>-				     &dev_priv->gmbus_mutex);
>+				     &dev_priv->display.gmbus.mutex);
> 	}
>
> 	intel_cdclk_set_cdclk(dev_priv, cdclk_config, pipe);
>@@ -2113,7 +2113,7 @@ static void intel_set_cdclk(struct drm_i915_private *dev_priv,
>
> 		mutex_unlock(&intel_dp->aux.hw_mutex);
> 	}
>-	mutex_unlock(&dev_priv->gmbus_mutex);
>+	mutex_unlock(&dev_priv->display.gmbus.mutex);
>
> 	for_each_intel_encoder_with_psr(&dev_priv->drm, encoder) {
> 		struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
>diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
>index 306584c038c9..fe19d4f9a9ab 100644
>--- a/drivers/gpu/drm/i915/display/intel_display_core.h
>+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
>@@ -6,7 +6,11 @@
> #ifndef __INTEL_DISPLAY_CORE_H__
> #define __INTEL_DISPLAY_CORE_H__
>
>+#include <linux/mutex.h>
> #include <linux/types.h>
>+#include <linux/wait.h>
>+
>+#include "intel_gmbus.h"
>
> struct drm_i915_private;
> struct intel_atomic_state;
>@@ -78,6 +82,25 @@ struct intel_display {
> 		/* Display internal color functions */
> 		const struct intel_color_funcs *color;
> 	} funcs;
>+
>+	/* Grouping using anonymous structs. Keep sorted. */

this maybe deserves to be a comment on top of struct intel_display.
Maybe alsos s/Grouping/Group/

regardless,


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

Lucas De Marchi


More information about the Intel-gfx mailing list