Re: [Nouveau] [PATCH 0/3] Add separate non-KMS state; constify struct drm_driver

2020-02-25 Thread Thomas Zimmermann
Hi Am 25.02.20 um 18:44 schrieb Daniel Vetter: > On Tue, Feb 25, 2020 at 04:58:59PM +0100, Thomas Zimmermann wrote: >> This patchset moves legacy, non-KMS driver state from struct drm_driver >> into struct drm_legacy_state. Only non-KMS drivers provide an instance >> of the latter structure. One s

Re: [Nouveau] [PATCH 1/3] drm: Add separate state structure for legacy, non-KMS drivers

2020-02-25 Thread Thomas Zimmermann
Hi Emil Am 25.02.20 um 18:37 schrieb Emil Velikov: > Hi Thomas, > > On Tuesday, 25 February 2020, Thomas Zimmermann > wrote: > > Non-KMS drivers store state in struct drm_driver. This bloats the > structure for KMS drivers and prevents it from being declared

Re: [Nouveau] [PATCH 0/3] Add separate non-KMS state; constify struct drm_driver

2020-02-25 Thread Daniel Vetter
On Tue, Feb 25, 2020 at 04:58:59PM +0100, Thomas Zimmermann wrote: > This patchset moves legacy, non-KMS driver state from struct drm_driver > into struct drm_legacy_state. Only non-KMS drivers provide an instance > of the latter structure. One special case is nouveau, which supports > legacy inter

Re: [Nouveau] [PATCH 1/3] drm: Add separate state structure for legacy, non-KMS drivers

2020-02-25 Thread Emil Velikov
Hi Thomas, On Tuesday, 25 February 2020, Thomas Zimmermann wrote: > Non-KMS drivers store state in struct drm_driver. This bloats the > structure for KMS drivers and prevents it from being declared with > 'static const' qualifiers. Moving the non-KMS state into a separate > data structure resolv

Re: [Nouveau] [PATCH 1/3] drm: Add separate state structure for legacy, non-KMS drivers

2020-02-25 Thread Thomas Zimmermann
Hi Am 25.02.20 um 17:06 schrieb Ilia Mirkin: > On Tue, Feb 25, 2020 at 10:59 AM Thomas Zimmermann > wrote: >> >> Non-KMS drivers store state in struct drm_driver. This bloats the >> structure for KMS drivers and prevents it from being declared with >> 'static const' qualifiers. Moving the non-KM

Re: [Nouveau] [PATCH 1/3] drm: Add separate state structure for legacy, non-KMS drivers

2020-02-25 Thread Ilia Mirkin
On Tue, Feb 25, 2020 at 10:59 AM Thomas Zimmermann wrote: > > Non-KMS drivers store state in struct drm_driver. This bloats the > structure for KMS drivers and prevents it from being declared with > 'static const' qualifiers. Moving the non-KMS state into a separate > data structure resolves this.

[Nouveau] [PATCH 0/3] Add separate non-KMS state; constify struct drm_driver

2020-02-25 Thread Thomas Zimmermann
This patchset moves legacy, non-KMS driver state from struct drm_driver into struct drm_legacy_state. Only non-KMS drivers provide an instance of the latter structure. One special case is nouveau, which supports legacy interfaces. It also provides an instance of the legacy state if the legacy inter

[Nouveau] [PATCH 1/3] drm: Add separate state structure for legacy, non-KMS drivers

2020-02-25 Thread Thomas Zimmermann
Non-KMS drivers store state in struct drm_driver. This bloats the structure for KMS drivers and prevents it from being declared with 'static const' qualifiers. Moving the non-KMS state into a separate data structure resolves this. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_drv.c

[Nouveau] [PATCH 3/3] drm: Constify struct drm_driver in DRM core

2020-02-25 Thread Thomas Zimmermann
Once used for creatign a DRM device, instances of struct drm_driver are not modified. So all related variables in the DRM core can be declared 'const'. In addition to the core interfaces, the patch also changes tdfx accordingly. The other non-KMS drivers set.num_ioctls outside of their instance's

[Nouveau] [PATCH 2/3] drm: Move non-kms driver state into struct drm_legacy_state

2020-02-25 Thread Thomas Zimmermann
All non-kms driver fields are now located in struct drm_legacy_state. A driver-wide instance is available via struct drm_driver.legacy. The call sites test if the driver is marked with DRIVER_LEGACY before accessing the fields. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_bufs.c