All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [Intel-gfx] [PATCH v2 1/6] drm: Include the encoder itself in possible_clones
Date: Fri, 7 Feb 2020 17:40:41 +0100	[thread overview]
Message-ID: <20200207164041.GO43062@phenom.ffwll.local> (raw)
In-Reply-To: <20200207163447.GN13686@intel.com>

On Fri, Feb 07, 2020 at 06:34:47PM +0200, Ville Syrjälä wrote:
> On Fri, Feb 07, 2020 at 05:27:51PM +0100, Daniel Vetter wrote:
> > On Fri, Feb 07, 2020 at 04:50:01PM +0200, Ville Syrjälä wrote:
> > > On Fri, Feb 07, 2020 at 03:28:35PM +0100, Thomas Zimmermann wrote:
> > > > Hi
> > > > 
> > > > Am 07.02.20 um 14:59 schrieb Ville Syrjala:
> > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > 
> > > > > The docs say possible_clones should always include the encoder itself.
> > > > > Since most drivers don't want to deal with the complexities of cloning
> > > > > let's allow them to set possible_clones=0 and instead we'll fix that
> > > > > up in the core.
> > > > > 
> > > > > We can't put this special case into drm_encoder_init() because drivers
> > > > > will have to fill up possible_clones after adding all the relevant
> > > > > encoders. Otherwise they wouldn't know the proper encoder indexes to
> > > > > use. So we'll just do it just before registering the encoders.
> > > > > 
> > > > > TODO: Should we do something similar for possible_crtcs==0?
> > > > > 
> > > > > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > > > > Cc: Daniel Vetter <daniel@ffwll.ch>
> > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > 
> > > > May this fixup function should warn iff possible_clones was set to non-0
> > > > by the driver, but the encoder itself is missing.
> > > 
> > > Yeah, I guess we could do that.
> > 
> > +1 on that, should catch some bugs at least.
> > 
> > Also can you pls fix up the kerneldoc for drm_encoder.possible_clones,
> > defacto this now means that 0 is a totally fine setting.
> 
> Sure.
> 
> And for possible_crtcs I was thinking similar concept:
> 
> for_each_encoder()
> 	if (possible_crtc == 0)
> 		possible_crtcs = all_crtc_mask;

A quick grep shows that I think we can risk enforcing this. If that turns
out to be a misconception we can always go back to the fixup approach if
possible_crtcs is 0. But unlike possible_clones I think for possible_crtcs
the fixup-less approach looks possible at least.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [Intel-gfx] [PATCH v2 1/6] drm: Include the encoder itself in possible_clones
Date: Fri, 7 Feb 2020 17:40:41 +0100	[thread overview]
Message-ID: <20200207164041.GO43062@phenom.ffwll.local> (raw)
In-Reply-To: <20200207163447.GN13686@intel.com>

On Fri, Feb 07, 2020 at 06:34:47PM +0200, Ville Syrjälä wrote:
> On Fri, Feb 07, 2020 at 05:27:51PM +0100, Daniel Vetter wrote:
> > On Fri, Feb 07, 2020 at 04:50:01PM +0200, Ville Syrjälä wrote:
> > > On Fri, Feb 07, 2020 at 03:28:35PM +0100, Thomas Zimmermann wrote:
> > > > Hi
> > > > 
> > > > Am 07.02.20 um 14:59 schrieb Ville Syrjala:
> > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > 
> > > > > The docs say possible_clones should always include the encoder itself.
> > > > > Since most drivers don't want to deal with the complexities of cloning
> > > > > let's allow them to set possible_clones=0 and instead we'll fix that
> > > > > up in the core.
> > > > > 
> > > > > We can't put this special case into drm_encoder_init() because drivers
> > > > > will have to fill up possible_clones after adding all the relevant
> > > > > encoders. Otherwise they wouldn't know the proper encoder indexes to
> > > > > use. So we'll just do it just before registering the encoders.
> > > > > 
> > > > > TODO: Should we do something similar for possible_crtcs==0?
> > > > > 
> > > > > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > > > > Cc: Daniel Vetter <daniel@ffwll.ch>
> > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > 
> > > > May this fixup function should warn iff possible_clones was set to non-0
> > > > by the driver, but the encoder itself is missing.
> > > 
> > > Yeah, I guess we could do that.
> > 
> > +1 on that, should catch some bugs at least.
> > 
> > Also can you pls fix up the kerneldoc for drm_encoder.possible_clones,
> > defacto this now means that 0 is a totally fine setting.
> 
> Sure.
> 
> And for possible_crtcs I was thinking similar concept:
> 
> for_each_encoder()
> 	if (possible_crtc == 0)
> 		possible_crtcs = all_crtc_mask;

A quick grep shows that I think we can risk enforcing this. If that turns
out to be a misconception we can always go back to the fixup approach if
possible_crtcs is 0. But unlike possible_clones I think for possible_crtcs
the fixup-less approach looks possible at least.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-02-07 16:40 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-07 13:59 [PATCH v2 0/6] drm: Try to fix encoder possible_clones/crtc Ville Syrjala
2020-02-07 13:59 ` [Intel-gfx] " Ville Syrjala
2020-02-07 13:59 ` [PATCH v2 1/6] drm: Include the encoder itself in possible_clones Ville Syrjala
2020-02-07 13:59   ` [Intel-gfx] " Ville Syrjala
2020-02-07 14:28   ` Thomas Zimmermann
2020-02-07 14:28     ` [Intel-gfx] " Thomas Zimmermann
2020-02-07 14:50     ` Ville Syrjälä
2020-02-07 14:50       ` [Intel-gfx] " Ville Syrjälä
2020-02-07 16:27       ` Daniel Vetter
2020-02-07 16:27         ` Daniel Vetter
2020-02-07 16:34         ` Ville Syrjälä
2020-02-07 16:34           ` Ville Syrjälä
2020-02-07 16:40           ` Daniel Vetter [this message]
2020-02-07 16:40             ` Daniel Vetter
2020-02-10  8:16         ` Thomas Zimmermann
2020-02-10  8:16           ` Thomas Zimmermann
2020-02-07 16:36   ` Daniel Vetter
2020-02-07 16:36     ` [Intel-gfx] " Daniel Vetter
2020-02-07 13:59 ` [PATCH v2 2/6] drm/gma500: Sanitize possible_clones Ville Syrjala
2020-02-07 13:59   ` [Intel-gfx] " Ville Syrjala
2020-02-07 16:30   ` Daniel Vetter
2020-02-07 16:30     ` [Intel-gfx] " Daniel Vetter
2020-02-07 13:59 ` [PATCH v2 3/6] drm/exynos: Use drm_encoder_mask() Ville Syrjala
2020-02-07 13:59   ` [Intel-gfx] " Ville Syrjala
2020-02-07 14:19   ` Thomas Zimmermann
2020-02-07 14:19     ` [Intel-gfx] " Thomas Zimmermann
2020-02-07 13:59 ` [PATCH v2 4/6] drm/imx: Remove the bogus possible_clones setup Ville Syrjala
2020-02-07 13:59   ` [Intel-gfx] " Ville Syrjala
2020-02-07 14:20   ` Thomas Zimmermann
2020-02-07 14:20     ` [Intel-gfx] " Thomas Zimmermann
2020-02-07 16:31     ` Daniel Vetter
2020-02-07 16:31       ` Daniel Vetter
2020-02-07 13:59 ` [PATCH v2 5/6] drm: Validate encoder->possible_clones Ville Syrjala
2020-02-07 13:59   ` [Intel-gfx] " Ville Syrjala
2020-02-07 14:25   ` Thomas Zimmermann
2020-02-07 14:25     ` [Intel-gfx] " Thomas Zimmermann
2020-02-07 13:59 ` [PATCH v2 6/6] drm: Validate encoder->possible_crtcs Ville Syrjala
2020-02-07 13:59   ` [Intel-gfx] " Ville Syrjala
2020-02-07 16:39   ` Daniel Vetter
2020-02-07 16:39     ` [Intel-gfx] " Daniel Vetter
2020-02-07 16:49     ` Ville Syrjälä
2020-02-07 16:49       ` [Intel-gfx] " Ville Syrjälä
2020-02-07 17:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm: Try to fix encoder possible_clones/crtc (rev2) Patchwork
2020-02-10 16:36 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=20200207164041.GO43062@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.