Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-14 Thread Thomas Hellström
On 9/14/21 4:07 PM, Daniel Vetter wrote: On Tue, Sep 14, 2021 at 12:38:00PM +0200, Thomas Hellström wrote: On Tue, 2021-09-14 at 10:53 +0200, Christian König wrote: Am 14.09.21 um 10:27 schrieb Thomas Hellström: On Tue, 2021-09-14 at 09:40 +0200, Christian König wrote: Am 13.09.21 um 14:41

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-14 Thread Daniel Vetter
On Tue, Sep 14, 2021 at 12:38:00PM +0200, Thomas Hellström wrote: > On Tue, 2021-09-14 at 10:53 +0200, Christian König wrote: > > Am 14.09.21 um 10:27 schrieb Thomas Hellström: > > > On Tue, 2021-09-14 at 09:40 +0200, Christian König wrote: > > > > Am 13.09.21 um 14:41 schrieb Thomas Hellström: > >

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-14 Thread Christian König
Am 14.09.21 um 10:27 schrieb Thomas Hellström: On Tue, 2021-09-14 at 09:40 +0200, Christian König wrote: Am 13.09.21 um 14:41 schrieb Thomas Hellström: [SNIP] Let's say you have a struct ttm_object_vram and a struct ttm_object_gtt, both subclassing drm_gem_object. Then I'd say a driver would w

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-14 Thread Christian König
Am 13.09.21 um 14:41 schrieb Thomas Hellström: [SNIP] Let's say you have a struct ttm_object_vram and a struct ttm_object_gtt, both subclassing drm_gem_object. Then I'd say a driver would want to subclass those to attach identical data, extend functionality and provide a single i915_gem_object

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-14 Thread Thomas Hellström
On Tue, 2021-09-14 at 10:53 +0200, Christian König wrote: > Am 14.09.21 um 10:27 schrieb Thomas Hellström: > > On Tue, 2021-09-14 at 09:40 +0200, Christian König wrote: > > > Am 13.09.21 um 14:41 schrieb Thomas Hellström: > > > > [SNIP] > > > > > > > Let's say you have a struct ttm_object_vram and

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-14 Thread Thomas Hellström
On Tue, 2021-09-14 at 09:40 +0200, Christian König wrote: > Am 13.09.21 um 14:41 schrieb Thomas Hellström: > > [SNIP] > > > > > Let's say you have a struct ttm_object_vram and a struct > > > > > ttm_object_gtt, both subclassing drm_gem_object. Then I'd say > > > > > a > > > > > driver would want

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-13 Thread Christian König
Am 13.09.21 um 11:36 schrieb Thomas Hellström: On 9/13/21 8:17 AM, Christian König wrote: Am 11.09.21 um 08:07 schrieb Thomas Hellström: On Fri, 2021-09-10 at 19:03 +0200, Christian König wrote: Am 10.09.21 um 17:30 schrieb Thomas Hellström: On Fri, 2021-09-10 at 16:40 +0200, Christian König

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-13 Thread Thomas Hellström
On 9/13/21 12:16 PM, Thomas Hellström wrote: On 9/13/21 11:41 AM, Christian König wrote: Am 13.09.21 um 11:36 schrieb Thomas Hellström: On 9/13/21 8:17 AM, Christian König wrote: Am 11.09.21 um 08:07 schrieb Thomas Hellström: On Fri, 2021-09-10 at 19:03 +0200, Christian König wrote: Am 10

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-13 Thread Christian König
Am 11.09.21 um 08:07 schrieb Thomas Hellström: On Fri, 2021-09-10 at 19:03 +0200, Christian König wrote: Am 10.09.21 um 17:30 schrieb Thomas Hellström: On Fri, 2021-09-10 at 16:40 +0200, Christian König wrote: Am 10.09.21 um 15:15 schrieb Thomas Hellström: Both the provider (resource manager)

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-13 Thread Thomas Hellström
On 9/13/21 11:41 AM, Christian König wrote: Am 13.09.21 um 11:36 schrieb Thomas Hellström: On 9/13/21 8:17 AM, Christian König wrote: Am 11.09.21 um 08:07 schrieb Thomas Hellström: On Fri, 2021-09-10 at 19:03 +0200, Christian König wrote: Am 10.09.21 um 17:30 schrieb Thomas Hellström: On F

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-13 Thread Thomas Hellström
On 9/13/21 8:17 AM, Christian König wrote: Am 11.09.21 um 08:07 schrieb Thomas Hellström: On Fri, 2021-09-10 at 19:03 +0200, Christian König wrote: Am 10.09.21 um 17:30 schrieb Thomas Hellström: On Fri, 2021-09-10 at 16:40 +0200, Christian König wrote: Am 10.09.21 um 15:15 schrieb Thomas He

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-10 Thread Thomas Hellström
On Fri, 2021-09-10 at 19:03 +0200, Christian König wrote: > Am 10.09.21 um 17:30 schrieb Thomas Hellström: > > On Fri, 2021-09-10 at 16:40 +0200, Christian König wrote: > > > > > > Am 10.09.21 um 15:15 schrieb Thomas Hellström: > > > > Both the provider (resource manager) and the consumer (the TTM

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-10 Thread Christian König
Am 10.09.21 um 17:30 schrieb Thomas Hellström: On Fri, 2021-09-10 at 16:40 +0200, Christian König wrote: Am 10.09.21 um 15:15 schrieb Thomas Hellström: Both the provider (resource manager) and the consumer (the TTM driver) want to subclass struct ttm_resource. Since this is left for the resour

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-10 Thread Christian König
Am 10.09.21 um 15:15 schrieb Thomas Hellström: Both the provider (resource manager) and the consumer (the TTM driver) want to subclass struct ttm_resource. Since this is left for the resource manager, we need to provide a private pointer for the TTM driver. Provide a struct ttm_resource_priva

Re: [Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-10 Thread Thomas Hellström
On Fri, 2021-09-10 at 16:40 +0200, Christian König wrote: > > > Am 10.09.21 um 15:15 schrieb Thomas Hellström: > > Both the provider (resource manager) and the consumer (the TTM > > driver) > > want to subclass struct ttm_resource. Since this is left for the > > resource > > manager, we need to p

[Intel-gfx] [RFC PATCH] drm/ttm: Add a private member to the struct ttm_resource

2021-09-10 Thread Thomas Hellström
Both the provider (resource manager) and the consumer (the TTM driver) want to subclass struct ttm_resource. Since this is left for the resource manager, we need to provide a private pointer for the TTM driver. Provide a struct ttm_resource_private for the driver to subclass for data with the same