All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Michel Dänzer" <michel@daenzer.net>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm: Introduce per-device driver_features
Date: Thu, 13 Sep 2018 18:06:01 +0300	[thread overview]
Message-ID: <20180913150601.GN5565@intel.com> (raw)
In-Reply-To: <cd9c48d4-89a8-f393-b072-efcff1717567@daenzer.net>

On Thu, Sep 13, 2018 at 04:52:34PM +0200, Michel Dänzer wrote:
> On 2018-09-13 4:29 p.m., Ville Syrjälä wrote:
> > On Thu, Sep 13, 2018 at 03:50:01PM +0200, Daniel Vetter wrote:
> >> On Thu, Sep 13, 2018 at 04:16:21PM +0300, Ville Syrjala wrote:
> >>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>>
> >>> We wish to control certain driver_features flags on a per-device basis
> >>> while still sharing a single drm_driver instance across all the
> >>> devices. To that end introduce device.driver_features. By default
> >>> it will be set to ~0 to not impose any limits beyond
> >>> driver.driver_features. Drivers can then clear specific flags
> >>> in the per-device bitmask to limit the capabilities of the device.
> >>>
> >>> An alternative approach would be to copy the driver_features from
> >>> the driver into the device in drm_dev_init(), however that would
> >>> require verifying that no driver is currently changing
> >>> driver.driver_features after drm_dev_init(). Hence the ~0 apporach
> >>> was easier.
> >>>
> >>> Ideally we'd also make drm_driver const but there is plenty of code
> >>> left that wants to mutate it (eg. various vfunc assignments). We'll
> >>> need to fix all that up before we can make it const.
> >>>
> >>> And while at it fix up the type of the feature flag passed to
> >>> drm_core_check_feature().
> >>>
> >>> v2: Streamline the && vs. & (Chris)
> >>>     s/int/u32/ in drm_core_check_feature() args
> >>>
> >>> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> >>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >>
> >> git grep DRIVER_ATOMIC -- drivers/gpu/drm/nouveau has a 2nd supporting
> >> case for this. Exactly same problem as we have here. Would be good to also
> >> convert that one, for a bit of OCD.
> > 
> > Thanks for pointing it out. I'll cook it up and send separately after
> > this lands.
> 
> I don't suppose you'd like to do amdgpu as well, while you're at it? :)

Sure. I'll take a gander at it as well.

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-09-13 15:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-13 13:16 [PATCH 1/2] drm: Introduce per-device driver_features Ville Syrjala
2018-09-13 13:16 ` [PATCH 2/2] drm/i915: Clear DRIVER_ATOMIC on a per-device basis Ville Syrjala
2018-09-13 13:28   ` Chris Wilson
2018-09-13 13:27 ` [PATCH 1/2] drm: Introduce per-device driver_features Chris Wilson
2018-09-13 13:50 ` [Intel-gfx] " Daniel Vetter
2018-09-13 14:29   ` Ville Syrjälä
2018-09-13 14:52     ` [Intel-gfx] " Michel Dänzer
2018-09-13 15:06       ` Ville Syrjälä [this message]
2018-09-13 16:24         ` Ville Syrjälä
2018-09-13 14:20 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2018-09-13 15:29 ` ✓ 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=20180913150601.GN5565@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michel@daenzer.net \
    /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.