linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: dri-devel@lists.freedesktop.org,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Emma Anholt <emma@anholt.net>,
	intel-gfx@lists.freedesktop.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH] drm/scdc-helper: Pimp SCDC debugs
Date: Thu, 30 Mar 2023 14:45:02 +0300	[thread overview]
Message-ID: <ZCV2Pge2+wdB5HEI@intel.com> (raw)
In-Reply-To: <20230330084404.5uku6p42rorcuhv2@penduick>

On Thu, Mar 30, 2023 at 10:44:04AM +0200, Maxime Ripard wrote:
> Hi,
> 
> On Wed, Mar 29, 2023 at 08:14:02PM +0300, Ville Syrjala wrote:
> > diff --git a/drivers/gpu/drm/display/drm_scdc_helper.c b/drivers/gpu/drm/display/drm_scdc_helper.c
> > index c3ad4ab2b456..2b124152384c 100644
> > --- a/drivers/gpu/drm/display/drm_scdc_helper.c
> > +++ b/drivers/gpu/drm/display/drm_scdc_helper.c
> > @@ -26,6 +26,8 @@
> >  #include <linux/delay.h>
> >  
> >  #include <drm/display/drm_scdc_helper.h>
> > +#include <drm/drm_connector.h>
> > +#include <drm/drm_device.h>
> >  #include <drm/drm_print.h>
> >  
> >  /**
> > @@ -140,6 +142,7 @@ EXPORT_SYMBOL(drm_scdc_write);
> >  
> >  /**
> >   * drm_scdc_get_scrambling_status - what is status of scrambling?
> > + * @connector: connector
> >   * @adapter: I2C adapter for DDC channel
> >   *
> >   * Reads the scrambler status over SCDC, and checks the
> > @@ -148,14 +151,17 @@ EXPORT_SYMBOL(drm_scdc_write);
> >   * Returns:
> >   * True if the scrambling is enabled, false otherwise.
> >   */
> > -bool drm_scdc_get_scrambling_status(struct i2c_adapter *adapter)
> > +bool drm_scdc_get_scrambling_status(struct drm_connector *connector,
> > +				    struct i2c_adapter *adapter)
> 
> Is there any driver where adapter isn't equal to connector->ddc?

I figured most of them since they all maintain their own ddc
pointer elsewhere. But looks like the drivers using the scdc
helper might all be setting connector->ddc for their HDMI
connectors despite that.

Even i915 does that apparently. My recollection was otherwise
since I have a branch waiting somewhere that changes the whole
driver to use connector->ddc.

I guess someone took a bunch of shortcuts to get connector->ddc
populated but then didn't finish the job by clearing out the
old pointers.

> 
> If not, there's no reason to pass both

Yeah, that did cross my mind. But left it out with in
the belief that it can't be done yet.

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2023-03-30 11:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 17:14 [PATCH] drm/scdc-helper: Pimp SCDC debugs Ville Syrjala
2023-03-30  8:44 ` Maxime Ripard
2023-03-30 11:45   ` Ville Syrjälä [this message]
2023-04-03 22:36 ` [PATCH v2] " Ville Syrjala
2023-04-04  2:21   ` Laurent Pinchart
2023-04-04  8:06   ` Maxime Ripard
2023-04-04  8:13   ` Andrzej Hajda
2023-04-04 11:28   ` Thierry Reding

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=ZCV2Pge2+wdB5HEI@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emma@anholt.net \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-tegra@vger.kernel.org \
    --cc=maxime@cerno.tech \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=thierry.reding@gmail.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;
as well as URLs for NNTP newsgroup(s).