[PATCH 2/2] Replace ttm_bo_unref with ttm_bo_put

2018-07-31 Thread Thomas Zimmermann
. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index f54d30186fd6..c5681477a3e2 100644 --- a/drivers

[PATCH 2/2] drm/radeon: Replace ttm_bo_unref with ttm_bo_put

2018-07-31 Thread Thomas Zimmermann
. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/radeon/radeon_object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 1a9d4f547024..ba2fd295697f 100644 --- a/drivers/gpu/drm/radeon

[PATCH 1/2] drm/amdgpu: Replace ttm_bo_reference with ttm_bo_get

2018-07-31 Thread Thomas Zimmermann
The function ttm_bo_get acquires a reference on a TTM buffer object. The function's name is more aligned to the Linux kernel convention of naming ref-counting function _get and _put. v2: * changed prefix to drm/amdgpu Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amdgpu: Replace ttm_bo_unref with ttm_bo_put

2018-07-31 Thread Thomas Zimmermann
. v2: * set prefix to drm/amdgpu Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index f54d30186fd6

[PATCH 0/2] drm/amdgpu: Clean-up TTM BO ref-counting interface

2018-07-31 Thread Thomas Zimmermann
This patchset replaces ttm_bo_{reference/unref} with ttm_bo_{get,put}, which follow Linux' conventions for ref-counting functions. v2: * use prefix drm/amdgpu Thomas Zimmermann (2): drm/amdgpu: Replace ttm_bo_reference with ttm_bo_get drm/amdgpu: Replace ttm_bo_unref with ttm_bo_put

[PATCH 1/2] drm/ttm: Rename ttm_bo_global_{init, release}() to ttm_bo_global_ref_*()

2018-08-13 Thread Thomas Zimmermann
The functions ttm_bo_global_init() and ttm_bo_global_release() do not receive an argument of type struct ttm_bo_global. Both take a struct drm_global_reference that contains points to a struct ttm_bo_global_ref. Renaming them reflects this. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm

[PATCH 0/2] Provide init/release functions for struct ttm_bo_global

2018-08-13 Thread Thomas Zimmermann
drivers. Future directions: All TTM-based drivers follow the same pattern for setting up the TTM. In a follow-up patch, this code can be moved into a single place and shared among drivers. Thomas Zimmermann (2): drm/ttm: Rename ttm_bo_global_{init,release}() to ttm_bo_global_ref_*() drm

[PATCH 2/2] drm/ttm: Provide ttm_bo_global_{init/release}() for struct ttm_bo_global

2018-08-13 Thread Thomas Zimmermann
. The original functions for initializing and releasing via struct ttm_bo_global_ref are wrappers around the new interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ttm/ttm_bo.c| 16 -- include/drm/ttm/ttm_bo_driver.h | 53 ++--- 2 files

Re: [PATCH 0/2] Provide init/release functions for struct ttm_bo_global

2018-08-13 Thread Thomas Zimmermann
n. > > Am 13.08.2018 um 12:24 schrieb Thomas Zimmermann: >> TTM uses global memory and BO for backing graphics buffers. These are >> represented by struct ttm_mem_global and struct ttm_bo_global. >> >> Currently, struct ttm_bo_global can only be initializ

Re: [PATCH 0/2] Provide init/release functions for struct ttm_bo_global

2018-08-30 Thread Thomas Zimmermann
had it on my TODO list to clean that up for an eternity. > > Actually I never understood why that should be driver work to setup TTM? > > I mean can't we just have a module_init/module_exit for TTM? > > Thanks, > Christian. > > Am 13.08.2018 um 12:24 schrieb Thomas Zimmerm

Re: [PATCH 0/2] Provide init/release functions for struct ttm_bo_global

2018-08-30 Thread Thomas Zimmermann
o clean that up for an eternity. >>> >>> Actually I never understood why that should be driver work to setup TTM? >>> >>> I mean can't we just have a module_init/module_exit for TTM? >>> >>> Thanks, >>> Christian. >>>

[PATCH] drm/amd: Replace drm_dev_unref with drm_dev_put

2018-06-28 Thread Thomas Zimmermann
This patch unifies the naming of DRM functions for reference counting of struct drm_device. The resulting code is more aligned with the rest of the Linux kernel interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 1/3] drm/ttm: Provide struct ttm_global for referencing TTM global state

2018-10-18 Thread Thomas Zimmermann
of struct ttm_global is also built on top of drm_global, so it can co-exists with the existing drivers. Once all TTM-based drivers have been converted to struct ttm_global, the implementation of struct drm_global can be made private to TTM. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ttm

[PATCH 2/3] drm/amdgpu: Replace TTM initialization/release with ttm_global

2018-10-18 Thread Thomas Zimmermann
Unified initialization and relesae of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 63 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +- 2 files changed, 7

[PATCH 3/3] drm/radeon: Replace TTM initialization/release with ttm_global

2018-10-18 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/radeon/radeon.h | 4 +-- drivers/gpu/drm/radeon/radeon_ttm.c | 40 - 2 files changed, 7

[PATCH 0/3] Provide struct ttm_global for TTM global state

2018-10-18 Thread Thomas Zimmermann
is implemented on top of struct drm_global. The latter actually maintains TTM state instead of DRM state. Once all drivers have been converted, the code for struct drm_global can be merged into struct ttm_global. (Resending this patch set, as I forgot to CC the mailing lists as first.) Thomas Zimmermann

[PATCH 15/18] drm: Remove DRM_GLOBAL_TTM_OBJECT

2018-10-19 Thread Thomas Zimmermann
The constant DRM_GLOBAL_TTM_OBJECT is unused and not obviously useful. Signed-off-by: Thomas Zimmermann --- include/drm/drm_global.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/drm/drm_global.h b/include/drm/drm_global.h index 4482a9bbd6e9..63ffdcec6690 100644 --- a/include/drm

[PATCH 18/18] drm: Remove drm_global.{c,h}

2018-10-19 Thread Thomas Zimmermann
The content of drm_global.{c,h} is obsolete. The functionality is provided in ttm_global.{c,h}. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_drv.c| 2 - drivers/gpu/drm/drm_global.c | 137

[PATCH 14/18] drm/ttm: Remove struct ttm_bo_global_ref and helpers

2018-10-19 Thread Thomas Zimmermann
The struct ttm_bo_global_ref data type providede a workaround for passing an instance of struct ttm_mem_global to ttm_bo_global_init(). This functionality has been replaced by struct ttm_global and all drivers have been converted. struct ttm_bo_global_ref is obsolete. Signed-off-by: Thomas

[PATCH 17/18] drm/ttm: Implement struct ttm_global with struct ttm_global_ref

2018-10-19 Thread Thomas Zimmermann
Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ttm/ttm_global.c | 28 +++- include/drm/ttm/ttm_global.h | 5 ++--- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_global.c b/drivers/gpu/drm/ttm/ttm_global.c index

[PATCH 16/18] drm/ttm: Implement struct ttm_global_item and helpers

2018-10-19 Thread Thomas Zimmermann
The data structure struct ttm_global_item is a replacement for struct drm_global_item. While struct drm_global_item depends on global data instances, struct ttm_global_item allows drivers to use their own privat instances. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ttm/ttm_global.c

[PATCH 11/18] drm/virtio: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/virtio/virtgpu_drv.h | 4 +-- drivers/gpu/drm/virtio/virtgpu_ttm.c | 40 +++- 2 files changed, 6

[PATCH 07/18] drm/hisilicon: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 4 +-- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 36 ++- 2 files changed, 5

[PATCH 10/18] drm/qlx: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_drv.h | 4 ++-- drivers/gpu/drm/qxl/qxl_ttm.c | 40 --- 2 files changed, 6 insertions

[PATCH 13/18] staging/vboxvideo: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/staging/vboxvideo/vbox_drv.h | 4 +-- drivers/staging/vboxvideo/vbox_ttm.c | 42 +++- 2 files changed, 6

[PATCH 05/18] drm/bochs: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/bochs/bochs.h| 5 ++-- drivers/gpu/drm/bochs/bochs_mm.c | 47 +--- 2 files changed, 10 insertions

[RFC][PATCH 00/18] Provide a nice interface for TTM global state

2018-10-19 Thread Thomas Zimmermann
. For now, I took the existing ref-counting as it is in drm_global.c. This can certainly be simplified if prefered. Thomas Zimmermann (18): drm/ttm: Provide struct ttm_global for referencing TTM global state drm/amdgpu: Replace TTM initialization/release with ttm_global drm/radeon: Replace TTM

[PATCH 01/18] drm/ttm: Provide struct ttm_global for referencing TTM global state

2018-10-19 Thread Thomas Zimmermann
of struct ttm_global is also built on top of drm_global, so it can co-exists with the existing drivers. Once all TTM-based drivers have been converted to struct ttm_global, the implementation of struct drm_global can be made private to TTM. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ttm

[PATCH 02/18] drm/amdgpu: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and relesae of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 63 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 4 +- 2 files changed, 7

[PATCH 03/18] drm/radeon: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/radeon/radeon.h | 4 +-- drivers/gpu/drm/radeon/radeon_ttm.c | 40 - 2 files changed, 7

[PATCH 09/18] drm/nouveau: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/nouveau/nouveau_drv.h | 5 +-- drivers/gpu/drm/nouveau/nouveau_ttm.c | 48 --- 2 files changed, 9

[PATCH 08/18] drm/mgag200: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_drv.h | 7 ++-- drivers/gpu/drm/mgag200/mgag200_ttm.c | 49 +-- 2 files changed, 12

[PATCH 12/18] drm/vmwgfx: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 6 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c

[PATCH 06/18] drm/cirrus: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/cirrus/cirrus_drv.h | 5 +-- drivers/gpu/drm/cirrus/cirrus_ttm.c | 49 + 2 files changed, 11

[PATCH 04/18] drm/ast: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Unified initialization and release of the global TTM state is provided by struct ttm_global and its interfaces. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_drv.h | 5 ++-- drivers/gpu/drm/ast/ast_ttm.c | 49 ++- 2 files changed, 11 insertions

Re: [PATCH 0/3] Provide struct ttm_global for TTM global state

2018-10-19 Thread Thomas Zimmermann
-up of the code because TTM-based drivers depend on the current way of doing things. Maybe let me post my full patch set for RFC and discuss this instead. Best regards Thomas > Regards, > Christian. > > Am 18.10.18 um 18:27 schrieb Thomas Zimmermann: >> TTM provides global

Re: [PATCH 1/3] drm/ttm: Provide struct ttm_global for referencing TTM global state

2018-10-19 Thread Thomas Zimmermann
Hi, thanks for the review. Am 19.10.18 um 05:30 schrieb Huang Rui: > On Fri, Oct 19, 2018 at 12:27:50AM +0800, Thomas Zimmermann wrote: >> +int ttm_global_init(struct ttm_global *glob) >> +{ >> +int ret; >> + > > We would better add a protection here

Re: [PATCH 2/3] drm/amdgpu: Replace TTM initialization/release with ttm_global

2018-10-19 Thread Thomas Zimmermann
Hi, thanks for reviewing the patch. Am 19.10.18 um 08:18 schrieb Zhang, Jerry(Junwei): > On 10/19/2018 12:27 AM, Thomas Zimmermann wrote: >>   /** >>    * amdgpu_ttm_global_init - Initialize global TTM memory reference >> structures. >>    * >>

Re: [PATCH 1/5] drm/ttm: use a static ttm_mem_global instance

2018-10-23 Thread Thomas Zimmermann
*glob); > -int ttm_bo_global_init(struct ttm_bo_global *glob, > -struct ttm_mem_global *mem_glob); > +int ttm_bo_global_init(struct ttm_bo_global *glob); > > int ttm_bo_device_release(struct ttm_bo_device *bdev); > > @@ -895,7 +894,6 @@ extern const struct

Re: [PATCH 01/18] drm/ttm: Provide struct ttm_global for referencing TTM global state

2018-10-19 Thread Thomas Zimmermann
ttm_global, the implementation of struct drm_global can be made >> private to TTM. >> >> Signed-off-by: Thomas Zimmermann >> --- >>   drivers/gpu/drm/ttm/Makefile |  2 +- >>   drivers/gpu/drm/ttm/ttm_global.c | 98 >&g

[PATCH] drm/radeon: Finish GART and AGP resources after TTM

2019-03-28 Thread Thomas Zimmermann
accordingly. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/radeon/cik.c | 2 +- drivers/gpu/drm/radeon/evergreen.c | 2 +- drivers/gpu/drm/radeon/ni.c| 2 +- drivers/gpu/drm/radeon/r100.c | 6 +++--- drivers/gpu/drm/radeon/r300.c | 6 +++--- drivers/gpu/drm/radeon/r600.c

Re: [PATCH 2/5] drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant

2019-02-07 Thread Thomas Zimmermann
func { > _______ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel > -- Thomas Zimmermann Graphics Driver Developer SUSE Linux GmbH, Maxfeldstr. 5, D-90409 Nürnbe

Re: [PATCH 0/5] Clean up TTM mmap offsets

2019-02-07 Thread Thomas Zimmermann
Am 07.02.19 um 10:36 schrieb Koenig, Christian: > Am 07.02.19 um 09:59 schrieb Thomas Zimmermann: >> Almost all TTM-based drivers use the same values for the mmap-able >> range of BO addresses. Each driver therefore duplicates the >> DRM_FILE_PAGE_OFFSET constant. OTOH,

Re: [PATCH 2/5] drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant

2019-02-07 Thread Thomas Zimmermann
Hi Am 07.02.19 um 09:59 schrieb Thomas Zimmermann: > Most TTM drivers define the constant DRM_FILE_PAGE_OFFSET of the same > value. The only exception is vboxvideo, which is being converted to the > new offset by this patch. Unifying the constants in a single place > simplifies the

[PATCH 0/5] Clean up TTM mmap offsets

2019-02-07 Thread Thomas Zimmermann
code is located within TTM. TTM and GEM share the same range for mmap-able BOs. Thomas Zimmermann (5): staging/vboxvideo: Use same BO mmap offset as other drivers drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init() drm

[PATCH 4/5] drm/ttm: Quick-test mmap offset in ttm_bo_mmap()

2019-02-07 Thread Thomas Zimmermann
A BO's address has to be at least the minimum offset. Sharing this test in ttm_bo_mmap() removes code from drivers. A full buffer-address validation is still done within drm_vma_offset_lockup_locked(). Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9

[PATCH 5/5] drm: Use the same mmap-range offset and size for GEM and TTM

2019-02-07 Thread Thomas Zimmermann
GEM defines DRM_FILE_PAGE_OFFSET_{START,SIZE} constants for the mmap-able range of addresses. TTM can use them as well. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem.c | 17 - drivers/gpu/drm/ttm/ttm_bo.c| 4 ++-- drivers/gpu/drm/ttm/ttm_bo_vm.c | 2

[PATCH 1/5] staging/vboxvideo: Use same BO mmap offset as other drivers

2019-02-07 Thread Thomas Zimmermann
The vboxvideo driver mmaps BOs at 0x1000 or higher. Changing the offset to 0x1 aligns the driver with all other DRM drivers. Signed-off-by: Thomas Zimmermann --- drivers/staging/vboxvideo/vbox_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH 2/5] drm/ttm: Define a single DRM_FILE_PAGE_OFFSET constant

2019-02-07 Thread Thomas Zimmermann
Most TTM drivers define the constant DRM_FILE_PAGE_OFFSET of the same value. The only exception is vboxvideo, which is being converted to the new offset by this patch. Unifying the constants in a single place simplifies the driver code. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd

[PATCH 3/5] drm/ttm: Remove file_page_offset parameter from ttm_bo_device_init()

2019-02-07 Thread Thomas Zimmermann
The parameter file_page_offset is a constant shared by all drivers. Just replace it with the constant itself. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 - drivers/gpu/drm/ast/ast_ttm.c | 1 - drivers/gpu/drm/bochs/bochs_mm.c

Re: [PATCH] drm: increase drm mmap_range size to 1TB

2019-04-18 Thread Thomas Zimmermann
> mmap_range size decrease to 64GB from original 1TB. This is not big >> enough for applications. Increase the drm mmap_range size to 1TB. That change in size was accidental. Thanks for restoring the original value. The fix will affect GEM as well. If that is not a problem then Reviewed-

Re: [PATCH v4 17/23] drm/ast: Provide ddc symlink in connector sysfs directory

2019-07-11 Thread Thomas Zimmermann
Acked-by: Thomas Zimmermann Am 11.07.19 um 13:26 schrieb Andrzej Pietrasiewicz: > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz > --- > drivers/gpu/drm/ast/ast_mode.c | 9 + > 1 file changed, 5 insertions(+), 4 dele

Re: [PATCH v4 16/23] drm/mgag200: Provide ddc symlink in connector sysfs directory

2019-07-11 Thread Thomas Zimmermann
Acked-by: Thomas Zimmermann Am 11.07.19 um 13:26 schrieb Andrzej Pietrasiewicz: > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz > --- > drivers/gpu/drm/mgag200/mgag200_mode.c | 9 + > 1 file changed, 5 insertio

Re: [PATCH v3 01/22] drm: Include ddc adapter pointer in struct drm_connector

2019-06-30 Thread Thomas Zimmermann
ake it easy for the user to tell which i2c > + * adapter is for a particular display. > + */ > + struct i2c_adapter *ddc; > + > /** >* @null_edid_counter: track sinks that give us all zeros for the EDID. >* Needed to workaround some HW bug

Re: [PATCH v3 01/22] drm: Include ddc adapter pointer in struct drm_connector

2019-07-01 Thread Thomas Zimmermann
Hi Am 01.07.19 um 15:27 schrieb Andrzej Pietrasiewicz: > Hi Thomas, > > Thank you for your comments. Please see inline. > > W dniu 30.06.2019 o 10:12, Thomas Zimmermann pisze: >> Hi >> >> I like the idea, but would prefer a more structured approach. >> &

Re: [PATCH v4 14/23] drm/tilcdc: Provide ddc symlink in connector sysfs directory

2019-07-24 Thread Thomas Zimmermann
connector->ddc = ddc; /* set up sysfs */ return 0; } Best regards Thomas > Andrzej > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedeskt

Re: [PATCH v5 17/24] drm/mgag200: Provide ddc symlink in connector sysfs directory

2019-07-24 Thread Thomas Zimmermann
if (!mga_connector->i2c) > - DRM_ERROR("failed to add ddc bus\n"); > - > return connector; > } > > Reviewed-by: Thomas Zimmermann -- Thomas Zimmermann Graphics Driver Developer SUSE Linux GmbH, Maxfeldst

Re: [PATCH v5 18/24] drm/ast: Provide ddc symlink in connector sysfs directory

2019-07-24 Thread Thomas Zimmermann
or_attach_encoder(connector, encoder); > > - ast_connector->i2c = ast_i2c_create(dev); > - if (!ast_connector->i2c) > - DRM_ERROR("failed to add ddc bus for connector\n"); > - > return 0; > } > > Reviewed-by: Thomas Zimmermann -- Thomas

Re: [PATCH v5 02/24] drm: Add drm_connector_init() variant with ddc

2019-07-24 Thread Thomas Zimmermann
n ret; > +} > +EXPORT_SYMBOL(drm_connector_init_with_ddc); > + Thanks for including such a function. Acked-by: Thomas Zimmermann > /** > * drm_connector_attach_edid_property - attach edid property. > * @connector: the connector > diff --git a/include/drm/drm_connector.

Re: [PATCH v3 07/11] drm/ttm: rename ttm_fbdev_mmap

2019-09-19 Thread Thomas Zimmermann
ws to implement _gem_object_funcs.mmap in gem ttm helpers. > > Signed-off-by: Gerd Hoffmann Thanks. I find this to be a much cleaner interface than before. Acked-by: Thomas Zimmermann Best regards Thomas > --- > include/drm/ttm/ttm_bo_api.h | 10 -- > drivers/gpu/

Re: [PATCH 6/8] drm/vram-helper: don't use ttm bo->offset v3

2020-03-05 Thread Thomas Zimmermann
nything else would be a massive ref-counting bug. And that's been the behavior of the old code as well. But I agree that the current patch is inconsistent. I suggest changing the return type of drm_gem_vram_pg_offset() to u64. Best regards Thomas > > cheers, > Gerd > >

[PATCH v4 22/22] drm: Remove legacy version of get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The legacy version of get_scanout_position() was only useful while drivers still used drm_driver.get_scanout_position(). With no such drivers left, the related typedef and code can be removed Signed-off-by: Thomas Zimmermann Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_vblank.c| 27

[PATCH v4 20/22] drm/vmwgfx: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert vmwgfx over. v2: * remove accidental whitespace fixes Signed-off-by: Thomas Zimmermann Acked-by: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 3

[PATCH v4 19/22] drm/vkms: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert vkms over. Signed-off-by: Thomas Zimmermann Reviewed-by: Rodrigo Siqueira Tested-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_crtc.c | 9 ++--- drivers/gpu/drm/vkms

[PATCH v4 03/22] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs

2020-01-23 Thread Thomas Zimmermann
v2: * rename helper to drm_crtc_vblank_helper_get_vblank_timestamp() * replace drm_calc_vbltimestamp_from_scanoutpos() with drm_crtc_vblank_helper_get_vblank_timestamp() in docs Signed-off-by: Thomas Zimmermann Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_vblank.c

[PATCH v4 01/22] drm: Remove internal setup of struct drm_device.vblank_disable_immediate

2020-01-23 Thread Thomas Zimmermann
drm_device.get_vblank_timestamp. v3: * remove internal setup of vblank_disable_immediate Signed-off-by: Thomas Zimmermann Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_vblank.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm

[PATCH v4 17/22] drm/vc4: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert vc4 over. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vc4/vc4_crtc.c | 12 +++- drivers/gpu/drm/vc4/vc4_drv.c | 1 - drivers/gpu/drm

[PATCH v4 21/22] drm: Clean-up VBLANK-related callbacks in struct drm_driver

2020-01-23 Thread Thomas Zimmermann
drm_calc_vbltimestamp_from_scanoutpos() Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Tested-by: Yannick Fertré --- drivers/gpu/drm/drm_vblank.c | 81 +++ include/drm/drm_drv.h| 153 +-- include/drm/drm_vblank.h | 4 - 3 files

[PATCH v4 09/22] drm/nouveau: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert nouvean over. v4: * add argument names in function declaration Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 3 +++ drivers/gpu/drm

[PATCH v4 00/22] drm: Clean up VBLANK callbacks in struct drm_driver

2020-01-23 Thread Thomas Zimmermann
for readability (Ville) v2: * reorder patches so the i915 can be converted without duplicating helper code. * merged cleanup patches * changed VBLANK function signatures in amdgpu (Alex) Thomas Zimmermann (22): drm: Remove internal setup of struct

[PATCH v4 11/22] drm/radeon: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert radeon over. Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_display.c | 12 -- drivers/gpu/drm/radeon/radeon_drv.c | 7

[PATCH v4 04/22] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert amdgpu over. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 12 drivers/gpu/drm/amd/amdgpu

[PATCH v4 07/22] drm/i915: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
for drm_crtc_vblank_helper_get_vblank_timestamp_internal() v2: * use DRM's implementation of get_vblank_timestamp() * simplify function names Signed-off-by: Thomas Zimmermann Reviewed-by: Ville Syrjälä Acked-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display.c | 7 +++ drivers/gpu/drm/i915/i915_drv.c

[PATCH v4 06/22] drm/gma500: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert gma500 over. Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_display.c | 3 +++ drivers/gpu/drm/gma500/psb_drv.c | 4

[PATCH v4 18/22] drm/vc4: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert vc4 over. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vc4/vc4_crtc.c | 1 + drivers/gpu/drm/vc4/vc4_drv.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v4 12/22] drm/msm: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert mem over. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 67 +++ drivers/gpu/drm/msm/disp/mdp5

[PATCH v4 15/22] drm/stm: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert stm over. Signed-off-by: Thomas Zimmermann Tested-by: Yannick Fertré --- drivers/gpu/drm/stm/drv.c | 1 - drivers/gpu/drm/stm/ltdc.c | 1 + 2 files changed, 1 insertion(+), 1

[PATCH v4 13/22] drm/msm: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert msm over. Signed-off-by: Thomas Zimmermann Tested-by: Yannick Fertré --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 ++ drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 2

[PATCH v4 16/22] drm/sti: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert sti over. v2: * remove unnecessary include of sti_crtc.h from sti_drv.c Signed-off-by: Thomas Zimmermann Acked-by: Benjamin Gaignard --- drivers/gpu/drm/sti/sti_crtc.c

[PATCH v4 14/22] drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert stm over. Signed-off-by: Thomas Zimmermann Tested-by: Yannick Fertré --- drivers/gpu/drm/stm/drv.c | 1 - drivers/gpu/drm/stm/ltdc.c | 65

[PATCH v4 02/22] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs

2020-01-23 Thread Thomas Zimmermann
drm_calc_vbltimestamp_from_scanoutpos() to minimize code duplication * define types for get_scanout_position() callbacks v2: * fix logical op in drm_calc_vbltimestamp_from_scanoutpos() Signed-off-by: Thomas Zimmermann Tested-by: Yannick Fertré Reviewed-by: Ville Syrjälä --- drivers

[PATCH v4 10/22] drm/radeon: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert radeon over. v4: * 80-character line fixes Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/radeon/atombios_crtc.c | 1 + drivers/gpu

[PATCH v4 05/22] drm/amdgpu: Convert to CRTC VBLANK callbacks

2020-01-23 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert amdgpu over. v2: * don't wrap existing functions; change signature instead Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6

[PATCH v4 08/22] drm/nouveau: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-23 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert nouveau over. v4: * add argument names in function declaration Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/nouveau/dispnv04/crtc.c

Re: [PATCH 00/14] amdgpu: remove load and unload callbacks

2020-02-05 Thread Thomas Zimmermann
s/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 3 + > drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 1 - > .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 26 +++ > .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 3 + > .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 - > 18 f

Re: [PATCH 8/8] drm/ttm: do not keep GPU dependent addresses

2020-02-18 Thread Thomas Zimmermann
lude/drm/ttm/ttm_bo_driver.h > index c9e0fd09f4b2..c8ce6c181abe 100644 > --- a/include/drm/ttm/ttm_bo_driver.h > +++ b/include/drm/ttm/ttm_bo_driver.h > @@ -177,7 +177,6 @@ struct ttm_mem_type_manager { > bool has_type; > bool use_type; > uint32_t flags; > - ui

Re: [PATCH 0/8] do not store GPU address in TTM

2020-02-18 Thread Thomas Zimmermann
e/drm/ttm/ttm_bo_api.h| 2 -- > include/drm/ttm/ttm_bo_driver.h | 1 - > 35 files changed, 99 insertions(+), 76 deletions(-) > > -- > 2.25.0 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/m

Re: [PATCH 6/8] drm/vram-helper: don't use ttm bo->offset v2

2020-02-21 Thread Thomas Zimmermann
->bo.mem.start; > +} As Daniel said, you don't heve to document this function. Otherwise Reviewed-by: Thomas Zimmermann > + > /** > * drm_gem_vram_offset() - \ > Returns a GEM VRAM object's offset in video memory > @@ -214,7 +229,7 @@ s64 drm_gem_vram_offset(struct drm_gem_v

Re: [PATCH 00/15] amdgpu: remove load and unload callbacks (v3)

2020-02-10 Thread Thomas Zimmermann
Hi Am 07.02.20 um 20:50 schrieb Alex Deucher: > These are deprecated and the drm will soon start warning when drivers still > use them. It was a long and twisty road, but seems to work. > > v2: Add additional patch (13/15) which should fix the crash reported by > Thomas Zimmerman

Re: [RFC PATCH 0/6] do not store GPU address in TTM

2020-02-14 Thread Thomas Zimmermann
- > 33 files changed, 99 insertions(+), 72 deletions(-) > > -- > 2.25.0 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel > -- Thomas Zimmermann G

Re: [PATCH 8/8] drm/ttm: do not keep GPU dependent addresses

2020-02-18 Thread Thomas Zimmermann
Hi Am 18.02.20 um 18:13 schrieb Nirmoy: > > On 2/18/20 1:44 PM, Christian König wrote: >> Am 18.02.20 um 13:40 schrieb Thomas Zimmermann: >>> Hi >>> >>> Am 17.02.20 um 16:04 schrieb Nirmoy Das: >>>> GPU address handling is device specific

Re: [PATCH 8/8] drm/ttm: do not keep GPU dependent addresses

2020-02-18 Thread Thomas Zimmermann
Hi Am 18.02.20 um 19:23 schrieb Christian König: > Am 18.02.20 um 19:16 schrieb Thomas Zimmermann: >> Hi >> >> Am 18.02.20 um 18:13 schrieb Nirmoy: >>> On 2/18/20 1:44 PM, Christian König wrote: >>>> Am 18.02.20 um 13:40 schrieb Thomas Zimmermann: >>

Re: [PATCH 0/2] drm/radeon: have the callers of set_memory_*() check the return value

2020-01-09 Thread Thomas Zimmermann
>> Apart from that certainly a good idea to add __must_check to the >>>> functions. >>> Agreed! >>> >>> -Kees >>> >>> -- >>> Kees Cook >>> ___ >>> dri-devel mailing list >>> dri-de

Re: [PATCH 01/23] drm: Add get_scanout_position() to struct drm_crtc_helper_funcs

2020-01-14 Thread Thomas Zimmermann
Hi Am 14.01.20 um 16:31 schrieb Yannick FERTRE: > Thanks for the patch. > > Tested-by: Yannick Fertré Thanks for testing all these patches. Best regards Thomas > > BR > Yannick Fertré > > > On 1/10/20 10:21 AM, Thomas Zimmermann wrote: >> The new call

Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-15 Thread Thomas Zimmermann
Hi Am 13.01.20 um 19:52 schrieb Alex Deucher: > On Fri, Jan 10, 2020 at 4:21 AM Thomas Zimmermann wrote: >> >> The callback struct drm_driver.get_scanout_position() is deprecated in >> favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert >> amdgpu o

[PATCH v2 14/21] drm/stm: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-15 Thread Thomas Zimmermann
The callback struct drm_driver.get_scanout_position() is deprecated in favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert stm over. Signed-off-by: Thomas Zimmermann Tested-by: Yannick Fertré --- drivers/gpu/drm/stm/drv.c | 1 - drivers/gpu/drm/stm/ltdc.c | 65

[PATCH v2 18/21] drm/vc4: Convert to CRTC VBLANK callbacks

2020-01-15 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert vc4 over. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/vc4/vc4_crtc.c | 1 + drivers/gpu/drm/vc4/vc4_drv.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v2 00/21] drm: Clean up VBLANK callbacks in struct drm_driver

2020-01-15 Thread Thomas Zimmermann
. * merged cleanup patches * changed VBLANK function signatures in amdgpu Thomas Zimmermann (21): drm: Add get_scanout_position() to struct drm_crtc_helper_funcs drm: Evaluate struct drm_device.vblank_disable_immediate on each use drm: Add get_vblank_timestamp() to struct

[PATCH v2 03/21] drm: Add get_vblank_timestamp() to struct drm_crtc_funcs

2020-01-15 Thread Thomas Zimmermann
-by: Thomas Zimmermann --- drivers/gpu/drm/drm_vblank.c | 236 +-- include/drm/drm_crtc.h | 46 - include/drm/drm_modeset_helper_vtables.h | 4 +- include/drm/drm_vblank.h | 26 ++- 4 files changed, 292 insertions(+), 20

[PATCH v2 16/21] drm/sti: Convert to CRTC VBLANK callbacks

2020-01-15 Thread Thomas Zimmermann
VBLANK callbacks in struct drm_driver are deprecated in favor of their equivalents in struct drm_crtc_funcs. Convert sti over. v2: * remove unnecessary include of sti_crtc.h from sti_drv.c Signed-off-by: Thomas Zimmermann Acked-by: Benjamin Gaignard --- drivers/gpu/drm/sti/sti_crtc.c

  1   2   3   4   5   6   7   8   9   10   >