From: Jani Nikula <jani.nikula@intel.com>
To: "Murthy, Arun R" <arun.r.murthy@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Cc: "De Marchi, Lucas" <lucas.demarchi@intel.com>
Subject: Re: [Intel-gfx] [PATCH 09/39] drm/i915: move and group gmbus members under display.gmbus
Date: Fri, 12 Aug 2022 09:56:17 +0300 [thread overview]
Message-ID: <87sfm2rlv2.fsf@intel.com> (raw)
In-Reply-To: <DM6PR11MB3177BB7AF101A9021E62C4DCBA679@DM6PR11MB3177.namprd11.prod.outlook.com>
On Fri, 12 Aug 2022, "Murthy, Arun R" <arun.r.murthy@intel.com> wrote:
>> -----Original Message-----
>> From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Jani
>> Nikula
>> Sent: Thursday, August 11, 2022 8:37 PM
>> To: intel-gfx@lists.freedesktop.org
>> Cc: Nikula, Jani <jani.nikula@intel.com>; De Marchi, Lucas
>> <lucas.demarchi@intel.com>
>> Subject: [Intel-gfx] [PATCH 09/39] drm/i915: move and group gmbus
>> members under display.gmbus
>>
>> Move display related members under drm_i915_private display sub-struct.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@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. */
>> + struct {
>> + /*
>> + * Base address of where the gmbus and gpio blocks are
>> located
>> + * (either on PCH or on SoC for platforms without PCH).
>> + */
>> + u32 mmio_base;
>> +
>> + /*
>> + * gmbus.mutex protects against concurrent usage of the
>> single
>> + * hw gmbus controller on different i2c buses.
>> + */
>> + struct mutex mutex;
>> +
>> + struct intel_gmbus *bus[GMBUS_NUM_PINS];
>> +
>> + wait_queue_head_t wait_queue;
>> + } gmbus;
>> };
>
> Can this be moved to struct intel_dp?
Well, no. The data here is shared across all of them.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-08-12 6:56 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 15:07 [Intel-gfx] [PATCH 00/39] drm/i915: add display sub-struct to drm_i915_private Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 01/39] " Jani Nikula
2022-08-12 4:27 ` Murthy, Arun R
2022-08-12 6:40 ` Jani Nikula
2022-08-16 3:31 ` Murthy, Arun R
2022-08-16 7:37 ` Jani Nikula
2022-08-16 7:40 ` Murthy, Arun R
2022-08-17 1:23 ` Lucas De Marchi
2022-08-17 6:48 ` Jani Nikula
2022-08-17 8:07 ` Jani Nikula
2022-08-18 21:25 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 02/39] drm/i915: move cdclk_funcs to display.funcs Jani Nikula
2022-08-12 4:32 ` Murthy, Arun R
2022-08-12 6:43 ` Jani Nikula
2022-08-16 3:42 ` Murthy, Arun R
2022-08-11 15:07 ` [Intel-gfx] [PATCH 03/39] drm/i915: move dpll_funcs " Jani Nikula
2022-08-12 4:33 ` Murthy, Arun R
2022-08-11 15:07 ` [Intel-gfx] [PATCH 04/39] drm/i915: move hotplug_funcs " Jani Nikula
2022-08-12 4:37 ` Murthy, Arun R
2022-08-12 6:45 ` Jani Nikula
2022-08-17 1:28 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 05/39] drm/i915: move clock_gating_funcs " Jani Nikula
2022-08-12 4:41 ` Murthy, Arun R
2022-08-12 6:48 ` Jani Nikula
2022-08-12 6:51 ` Jani Nikula
2022-08-16 3:45 ` Murthy, Arun R
2022-08-17 1:38 ` Lucas De Marchi
2022-08-17 6:50 ` Jani Nikula
2022-08-17 7:20 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 06/39] drm/i915: move wm_disp funcs " Jani Nikula
2022-08-12 4:45 ` Murthy, Arun R
2022-08-12 6:54 ` Jani Nikula
2022-08-16 3:48 ` Murthy, Arun R
2022-08-17 3:50 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 07/39] drm/i915: move fdi_funcs " Jani Nikula
2022-08-12 4:48 ` Murthy, Arun R
2022-08-17 3:51 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 08/39] drm/i915: move color_funcs " Jani Nikula
2022-08-12 4:49 ` Murthy, Arun R
2022-08-17 3:52 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 09/39] drm/i915: move and group gmbus members under display.gmbus Jani Nikula
2022-08-12 4:53 ` Murthy, Arun R
2022-08-12 6:56 ` Jani Nikula [this message]
2022-08-16 3:59 ` Murthy, Arun R
2022-08-16 7:50 ` Jani Nikula
2022-08-16 8:04 ` Murthy, Arun R
2022-08-17 3:56 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 10/39] drm/i915: move and group pps members under display.pps Jani Nikula
2022-08-12 4:54 ` Murthy, Arun R
2022-08-12 6:58 ` Jani Nikula
2022-08-16 4:03 ` Murthy, Arun R
2022-08-17 3:57 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 11/39] drm/i915: move dmc to display.dmc Jani Nikula
2022-08-12 4:58 ` Murthy, Arun R
2022-08-12 7:00 ` Jani Nikula
2022-08-16 4:07 ` Murthy, Arun R
2022-08-11 15:07 ` [Intel-gfx] [PATCH 12/39] drm/i915: move and split audio under display.audio and display.funcs Jani Nikula
2022-08-12 5:02 ` Murthy, Arun R
2022-08-12 7:03 ` Jani Nikula
2022-08-16 4:13 ` Murthy, Arun R
2022-08-16 8:02 ` Jani Nikula
2022-08-16 8:28 ` Murthy, Arun R
2022-08-17 4:14 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 13/39] drm/i915: move dpll under display.dpll Jani Nikula
2022-08-17 4:16 ` Lucas De Marchi
2022-08-24 10:35 ` Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 14/39] drm/i915: move and group fbdev under display.fbdev Jani Nikula
2022-08-22 3:58 ` Murthy, Arun R
2022-08-11 15:07 ` [Intel-gfx] [PATCH 15/39] drm/i915: move wm to display.wm Jani Nikula
2022-08-22 4:00 ` Murthy, Arun R
2022-08-11 15:07 ` [Intel-gfx] [PATCH 16/39] drm/i915: move and group hdcp under display.hdcp Jani Nikula
2022-08-22 4:02 ` Murthy, Arun R
2022-08-11 15:07 ` [Intel-gfx] [PATCH 17/39] drm/i915: move hotplug to display.hotplug Jani Nikula
2022-08-17 4:24 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 18/39] drm/i915: move overlay to display.overlay Jani Nikula
2022-08-22 4:10 ` Murthy, Arun R
2022-08-11 15:07 ` [Intel-gfx] [PATCH 19/39] drm/i915: move and group sagv under display.sagv Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 20/39] drm/i915: move and group max_bw and bw_obj under display.bw Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 21/39] drm/i915: move opregion to display.opregion Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 22/39] drm/i915: move and group cdclk under display.cdclk Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 23/39] drm/i915: move backlight to display.backlight Jani Nikula
2022-08-17 4:30 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 24/39] drm/i915: move mipi_mmio_base to display.dsi Jani Nikula
2022-08-17 4:32 ` Lucas De Marchi
2022-08-17 7:00 ` Jani Nikula
2022-08-17 7:21 ` Lucas De Marchi
2022-08-17 7:54 ` Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 25/39] drm/i915: move vbt to display.vbt Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 26/39] drm/i915: move fbc to display.fbc Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 27/39] drm/i915/vrr: drop window2_delay member from i915 Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 28/39] drm/i915: move and group power related members under display.power Jani Nikula
2022-08-17 4:41 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 29/39] drm/i915: move and group fdi members under display.fdi Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 30/39] drm/i915: move fb_tracking under display sub-struct Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 31/39] drm/i915: move INTEL_FRONTBUFFER_* macros to intel_frontbuffer.h Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 32/39] drm/i915: move dbuf under display sub-struct Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 33/39] drm/i915: move and group modeset_wq and flip_wq under display.wq Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 34/39] drm/i915: split gem quirks from display quirks Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 35/39] drm/i915/quirks: abstract checking for " Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 36/39] drm/i915/quirks: abstract quirks further by making quirk ids an enum Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 37/39] drm/i915: move quirks under display sub-struct Jani Nikula
2022-08-17 4:49 ` Lucas De Marchi
2022-08-11 15:07 ` [Intel-gfx] [PATCH 38/39] drm/i915: move atomic_helper " Jani Nikula
2022-08-11 15:07 ` [Intel-gfx] [PATCH 39/39] drm/i915: move and group properties under display.properties Jani Nikula
2022-08-11 15:15 ` [Intel-gfx] [PATCH 00/39] drm/i915: add display sub-struct to drm_i915_private Jani Nikula
2022-08-11 15:38 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-08-11 15:38 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-08-11 15:58 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-08-12 0:40 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-08-17 4:52 ` [Intel-gfx] [PATCH 00/39] " Lucas De Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sfm2rlv2.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=arun.r.murthy@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox