Re: [PATCH 1/2] drm/nouveau: Disable atomic support on a per-device basis

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 13, 2018 at 11:02 PM, Lyude Paul <lyude@xxxxxxxxxx> wrote:
> Hm, one nitpick here. Since /sys/kernel/debug/dri/*/state creation depends on
> the driver supporting atomic, maybe it would be good to make it so that we set
> DRIVER_ATOMIC in the driver_stub structure, then disable it per-device depending
> on the nouveau_atomic setting + hw support. That way we can always have the
> state debugfs file while maintaining nouveau's current behavior with exposing
> atomic ioctls. Assuming that wouldn't have any unintended side-effects of course

dri/*/state only works with atomic drivers. There's no explicit state
with legacy drivers at all, it's all just implicit in hw and some
random driver structures.

We should make sure though that the debugfs stuff looks at
drm_drv_uses_atomic_modsetting(), and not DRIVER_ATOMIC. Former is
about the internals (i915 is internally atomic everywhere), latter
about the uapi (some old platforms aren't properly validated for full
atomic features, hence why it's disabled).
-Daniel

> On Thu, 2018-09-13 at 19:31 +0300, Ville Syrjala wrote:
>> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>>
>> We now have per-device driver_features, so let's use that
>> to disable atomic only for pre-nv50.
>>
>> Cc: Ben Skeggs <bskeggs@xxxxxxxxxx>
>> Cc: Lyude Paul <lyude@xxxxxxxxxx>
>> Cc: nouveau@xxxxxxxxxxxxxxxxxxxxx
>> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
>> Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
>> Suggested-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
>> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
>> ---
>>  drivers/gpu/drm/nouveau/dispnv04/disp.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/nouveau/dispnv04/disp.c
>> b/drivers/gpu/drm/nouveau/dispnv04/disp.c
>> index 70dce544984e..670535a68d3b 100644
>> --- a/drivers/gpu/drm/nouveau/dispnv04/disp.c
>> +++ b/drivers/gpu/drm/nouveau/dispnv04/disp.c
>> @@ -56,7 +56,7 @@ nv04_display_create(struct drm_device *dev)
>>       nouveau_display(dev)->fini = nv04_display_fini;
>>
>>       /* Pre-nv50 doesn't support atomic, so don't expose the ioctls */
>> -     dev->driver->driver_features &= ~DRIVER_ATOMIC;
>> +     dev->driver_features &= ~DRIVER_ATOMIC;
>>
>>       nouveau_hw_save_vga_fonts(dev, 1);
>>
>



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux