Re: [PATCH v3] drm/etnaviv: Request pages from DMA32 zone on addressing_limited

2024-09-11 Thread Sui Jingfeng
naviv: request pages from DMA32 zone when needed") Suggested-by: Sui Jingfeng Signed-off-by: Xiaolei Wang --- change log v1: https://patchwork.kernel.org/project/dri-devel/patch/20240806104733.2018783-1-xiaolei.w...@windriver.com/ v2: Modify the issue of not retaining GFP_USER in v1

[PATCH v2 5/5] drm/etnaviv: Replace the '&pdev->dev' with 'dev'

2024-09-08 Thread Sui Jingfeng
ev' uniformly. Tested-by: Christian Gmeiner Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 10 +- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 16 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_d

[PATCH v2 4/5] drm/etnaviv: Fix missing mutex_destroy()

2024-09-08 Thread Sui Jingfeng
. It also could lead to problems if mutex_destroy() gets extended, add missing mutex_destroy() to eliminate potential concerns. Reviewed-by: Christian Gmeiner Signed-off-by: Sui Jingfeng --- v2: Pick up tags and fix one more missing mutex_destroy() drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 2

[PATCH v2 3/5] drm/etnaviv: Drop the header

2024-09-08 Thread Sui Jingfeng
Currently, the etnaviv_gem_submit.c isn't call any runtime power management functions. So drop this unused header, we can include it back when it really get used though. Reviewed-by: Christian Gmeiner Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 1 - 1

[PATCH v2 2/5] drm/etnaviv: Use 'unsigned' type to count the number of pages

2024-09-08 Thread Sui Jingfeng
y: Christian Gmeiner Signed-off-by: Sui Jingfeng --- v2: Pick up tags and improve commit message drivers/gpu/drm/etnaviv/etnaviv_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c index 5ffc31

[PATCH v2 1/5] drm/etnaviv: Use unsigned type to count the number of pages

2024-09-08 Thread Sui Jingfeng
Reviewed-by: Christian Gmeiner Signed-off-by: Sui Jingfeng --- v2: Pick up tags and improve commit message drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etn

[PATCH v15 17/19] drm/etnaviv: Support to manage dedicated VRAM base on drm_mm

2024-09-08 Thread Sui Jingfeng
. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/Makefile | 1 + drivers/gpu/drm/etnaviv/etnaviv_drv.c | 12 + drivers/gpu/drm/etnaviv/etnaviv_drv.h | 11 + drivers/gpu/drm/etnaviv/etnaviv_gem.h | 5 + drivers/gpu/drm/etnaviv/etnaviv_gem_vram.c | 258

[PATCH v15 19/19] drm/etnaviv: Expose basic sanity tests via debugfs

2024-09-08 Thread Sui Jingfeng
Passed: 8294400 bytes Test Write to SHMEM 8294400 bytes Write to SHMEM Passed: 8294400 bytes Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/Makefile | 1 + drivers/gpu/drm/etnaviv/etnaviv_debugfs.c | 118 + drivers/gpu/drm/etnaviv/etnaviv_debugfs.h | 15

[PATCH v15 18/19] drm/etnaviv: Allow userspace specify the domain of etnaviv GEM buffer object

2024-09-08 Thread Sui Jingfeng
Otherwise we don't know where a etnaviv GEM buffer object should put when we create it at userspace. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 9 + include/uapi/drm/etnaviv_drm.h| 12 2 files changed, 21 insertions(+) diff --

[PATCH v15 16/19] drm/etnaviv: Call etnaviv_gem_obj_add() in ernaviv_gem_new_private()

2024-09-08 Thread Sui Jingfeng
now, since the ernaviv_gem_new_private() has been unified. Make the etnaviv_gem_obj_add() static is a next nature thing. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 8 +++- drivers/gpu/drm/etnaviv/etnaviv_gem.h | 1 - drivers/gpu/drm/etnaviv/etnaviv_gem_pr

[PATCH v15 14/19] drm/etnaviv: Add PCIe IP setup code

2024-09-08 Thread Sui Jingfeng
Because some PCIe IP need special setup before its VRAM bar can be usable, do this with instance specific object function. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/Makefile | 3 +- drivers/gpu/drm/etnaviv/etnaviv_pci_drv.c | 19 drivers/gpu/drm/etnaviv

[PATCH v15 15/19] drm/etnaviv: Make more use of the etnaviv_gem_new_private() function

2024-09-08 Thread Sui Jingfeng
r handling anymore. if true, the drm_gem_object_init() will allocate backing storage for us, then this is a shmem buffer object. if false, we have to implement driver specific backing storage. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 28 + drive

[PATCH v15 13/19] drm/etnaviv: Add support for vivante GPU cores attached via PCIe device

2024-09-08 Thread Sui Jingfeng
. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/Kconfig | 9 ++ drivers/gpu/drm/etnaviv/Makefile | 2 + drivers/gpu/drm/etnaviv/etnaviv_drv.c | 45 +- drivers/gpu/drm/etnaviv/etnaviv_drv.h | 11 ++ drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 73

[PATCH v15 12/19] drm/etnaviv: Add support for cached coherent caching mode

2024-09-08 Thread Sui Jingfeng
uture if it not reflect the hardware perfectly. Expose it via etnaviv parameter mechanism to let userspace know. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 3 +++ drivers/gpu/drm/etnaviv/etnaviv_drv.h | 9 + drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 i

[PATCH v15 11/19] drm/etnaviv: Add etnaviv_gem_obj_remove() helper

2024-09-08 Thread Sui Jingfeng
Which is corresonding to the etnaviv_gem_obj_add() Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c index

[PATCH v15 10/19] drm/etnaviv: Embed struct drm_device into struct etnaviv_drm_private

2024-09-08 Thread Sui Jingfeng
containing structure. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_drv.c| 65 drivers/gpu/drm/etnaviv/etnaviv_drv.h| 7 +++ drivers/gpu/drm/etnaviv/etnaviv_gem.c| 4 +- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 2 +- drivers/gpu/d

[PATCH v15 09/19] drm/etnaviv: Add constructor and destructor for the etnaviv_drm_private structure

2024-09-08 Thread Sui Jingfeng
dedicated helpers introduced, etnaviv_bind() and etnaviv_unbind() gets simplified. Another potential benefit is that we could put the struct drm_device into struct etnaviv_drm_private in the future, which made them share the same life time. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etn

[PATCH v15 08/19] drm/etnaviv: Fix wrong caching mode being used for non writecombine buffers

2024-09-08 Thread Sui Jingfeng
rying to vmap a DMABUF") Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c index 1fd2cff20ef4..b899aea64

[PATCH v15 07/19] drm/etnaviv: Add a dedicated helper function to get various clocks

2024-09-08 Thread Sui Jingfeng
code blocks, which make it easier to call this function on the platform where it works. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 53 --- 1 file changed, 32 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/dr

[PATCH v15 06/19] drm/etnaviv: Prefer drm_device based drm_WARN_ON() over regular WARN_ON()

2024-09-08 Thread Sui Jingfeng
drm_WARN_ON() acts like WARN_ON(), but with the key difference of using device specific information so that we know from which device the warning is originating from. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 9 + drivers/gpu/drm/etnaviv

[PATCH v15 05/19] drm/etnaviv: Add contructor and destructor for etnaviv_gem_get_mapping structure

2024-09-08 Thread Sui Jingfeng
Because this make the code more easier to understand, When GPU access the VRAM, it will allocate a new mapping to use if there don't have one. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 40 +++ drivers/gpu/drm/etnaviv/etnaviv_gem.h

[PATCH v15 04/19] drm/etnaviv: Make etnaviv_gem_prime_vmap() a static function

2024-09-08 Thread Sui Jingfeng
has etnaviv_gem_prime_vmap_impl() as the implementation to vmap a imported GEM buffer object. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 - drivers/gpu/drm/etnaviv/etnaviv_gem.c | 16 +++- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 12

[PATCH v15 03/19] drm/etnaviv: Implement drm_gem_object_funcs::vunmap()

2024-09-08 Thread Sui Jingfeng
. As then, the etnaviv_gem_xxx_release() only need to responsible for the release page works. The etnaviv_gem_vunmap() is added for driver internal usa case, where no DRM GEM framework is involved. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_drv.h | 1 + drivers/gpu/drm

[PATCH v15 02/19] drm/etnaviv: Export drm_gem_print_info() and use it

2024-09-08 Thread Sui Jingfeng
This will make the newly implemented etnaviv_gem_object_funcs::print_info get in use, which improves code sharing and simplifies debugfs. Achieve better humen readability for debug log. Use container_of_const() if 'struct etnaviv_gem_object *etnaviv_obj' is a constant pointer. Signed-o

[PATCH v15 01/19] drm/etnaviv: Implement drm_gem_object_funcs::print_info()

2024-09-08 Thread Sui Jingfeng
It will be called by drm_gem_print_info() if implemented, and it can provide more information about the framebuffer objects. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 32 +++ drivers/gpu/drm/etnaviv/etnaviv_gem.h | 2 +- 2 files changed, 33

[PATCH v15 00/19] drm/etnaviv: Add driver wrapper for vivante GPUs attached on PCI(e) device

2024-09-08 Thread Sui Jingfeng
card. Select the PCIe device as parent, generate a virtual platform device as component master to take over the bind actions. Sui Jingfeng (19): drm/etnaviv: Implement drm_gem_object_funcs::print_info() drm/etnaviv: Export drm_gem_print_info() and use it drm/etnaviv: Implement

[PATCH] drm/etnaviv: Print error message when driver can't get pages

2024-09-08 Thread Sui Jingfeng
ernel." However, drm/etnaviv will use the pages to implement vmap and mmap operations of the GEM object function. The flag still set at present. When we can't get pages, it certainly is a bug. Hence, we should print this kind of error with drm_err() instead of dev_dbg(). Signed-off-b

Re: [v2] drm/etnaviv: Clear the __GFP_HIGHMEM bit in GFP_HIGHUSER with 32 address

2024-08-30 Thread Sui Jingfeng
Hi, Xiaolei Thanks for your nice catch! I have more to say. On 2024/8/16 09:55, Wang, Xiaolei wrote: Ping ... 32 address -> 32-bit address, Perhaps, we could improve the commit title a little bit by writing a more accurate sentence if possible, say: drm/etnaviv: Properly request pages from

Re: [v2] drm/etnaviv: Clear the __GFP_HIGHMEM bit in GFP_HIGHUSER with 32 address

2024-08-30 Thread Sui Jingfeng
On 2024/8/31 03:40, Sui Jingfeng wrote: Hi, Xiaolei On 2024/8/16 09:55, Wang, Xiaolei wrote: Ping ... I think, the more proper fix that Lucas hint is to modify the 'priv->shm_gfp_mask' variable in the|etnaviv_bind() function|. Say: |Use "priv->shm_gfp_mask = GFP_USER

Re: [v2] drm/etnaviv: Clear the __GFP_HIGHMEM bit in GFP_HIGHUSER with 32 address

2024-08-30 Thread Sui Jingfeng
Hi, Xiaolei On 2024/8/16 09:55, Wang, Xiaolei wrote: Ping ... I think, the more proper fix that Lucas hint is to modify the 'priv->shm_gfp_mask' variable in the|etnaviv_bind() function|. Say: |Use "priv->shm_gfp_mask = GFP_USER | __GFP_RETRY_MAYFAIL | __GFP_NOWARN;"| instead of |"priv->shm_

[PATCH 0/2] drm/etnaviv: Implement drm_gem_object_funcs::print_info()

2024-08-25 Thread Sui Jingfeng
objects, 2490368 bytes Sui Jingfeng (2): drm/etnaviv: Implement drm_gem_object_funcs::print_info() drm/etnaviv: Export drm_gem_print_info() and use it drivers/gpu/drm/drm_gem.c | 1 + drivers/gpu/drm/etnaviv/etnaviv_gem.c | 43 ++- drivers/gpu/drm/etnaviv

[PATCH 2/2] drm/etnaviv: Export drm_gem_print_info() and use it

2024-08-25 Thread Sui Jingfeng
This will make the newly implemented etnaviv_gem_object_funcs::print_info get in use, which improves code sharing and simplifies debugfs. Achieve better humen readability for debug log. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/drm_gem.c | 1 + drivers/gpu/drm/etnaviv

[PATCH 1/2] drm/etnaviv: Implement drm_gem_object_funcs::print_info()

2024-08-25 Thread Sui Jingfeng
It will be called by drm_gem_print_info() if have implemented, and this can provide more information about the framebuffer objects. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 32 +++ drivers/gpu/drm/etnaviv/etnaviv_gem.h | 2 +- 2 files

[PATCH] drm/etnaviv: Use unsigned type to count the number of userspace pages

2024-08-25 Thread Sui Jingfeng
The unpin_user_pages() function takes an unsigned long argument to store length of the number of user space pages, and struct drm_gem_object::size is a size_t type. The number of pages can not be negative, hence, use an unsigned variable to store the number of pages. Signed-off-by: Sui Jingfeng

[PATCH] drm/etnaviv: Use unsigned type to count the number of pages

2024-08-25 Thread Sui Jingfeng
type. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c index 3524b5811682..6b98200068e4 100644 --- a/drivers/gpu

[PATCH] drm/etnaviv: Drop the header

2024-08-25 Thread Sui Jingfeng
Currently, the etnaviv_gem_submit.c isn't call any runtime power management functions. So drop it, we can re-include it when the header really get used though. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dr

[PATCH] drm/etnaviv: Fix missing mutex_destroy()

2024-08-25 Thread Sui Jingfeng
. It also could lead to problems if mutex_destroy() gets extended, add missing mutex_destroy() to eliminate potential concerns. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.c | 3 +++ drivers/gpu/drm/etnaviv/etnaviv_drv.c| 1 + drivers/gpu/drm/etnaviv/etnaviv_gem.c

[PATCH] drm/etnaviv: Prefer drm_device based drm_WARN_ON() over regular WARN_ON()

2024-08-25 Thread Sui Jingfeng
drm_WARN_ON() acts like WARN_ON(), but with the key difference of using device specific information so that we know from which device warning is originating from. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 9 + drivers/gpu/drm/etnaviv

Re: [82/86] drm/i915: Move custom hotplug code into separate callback

2024-08-20 Thread Sui Jingfeng
Hi, On 2024/8/20 15:39, Thomas Zimmermann wrote: Hi Am 19.08.24 um 10:52 schrieb Sui Jingfeng: Hi, Thomas I love your patch, yet ... On 2024/8/16 20:23, Thomas Zimmermann wrote: i915's fbdev contains additional code for hotplugging a display that cannot be ported to the common

Re: [68/86] drm/loongson: Run DRM default client setup

2024-08-19 Thread Sui Jingfeng
is is the default if no format has been given, leave it out entirely. Signed-off-by: Thomas Zimmermann Thanks, Acked-by: Sui Jingfeng -- Best regards, Sui

Re: [82/86] drm/i915: Move custom hotplug code into separate callback

2024-08-19 Thread Sui Jingfeng
Hi, Thomas I love your patch, yet ... On 2024/8/16 20:23, Thomas Zimmermann wrote: i915's fbdev contains additional code for hotplugging a display that cannot be ported to the common fbdev client. Introduce the callback struct drm_fb_helper.fb_hotplug and implement it for i915. The fbdev help

Re: drm/mgag200: Fix VBLANK interrupt handling

2024-07-31 Thread Sui Jingfeng
Hi, On 2024/7/31 15:09, Thomas Zimmermann wrote: Fix support for VBLANK interrupts on G200ER, G200EV and G200SE, which use a slightly different implementation than the others. The original commits forgot to update the custom helpers when adding interrupt handling for VBLANK events. Signed-off-

Re: [PATCH v5 2/2] drm/loongson: Add dummy gpu driver as a subcomponent

2024-07-30 Thread Sui Jingfeng
Hi, On 2024/7/29 15:15, Markus Elfring wrote: … the driver is loaded, drm/loongson driver still need to wait all of needs to wait on …? … design. Therefore, add a dummy driver for the GPU, … Is there a need to reconsider the categorisation

Re: [PATCH v5 1/2] drm/loongson: Introduce component framework support

2024-07-30 Thread Sui Jingfeng
Hi, On 2024/7/29 14:40, Markus Elfring wrote: … +++ b/drivers/gpu/drm/loongson/loongson_drv.h @@ -0,0 +1,108 @@ … +#ifndef __LOONGSON_DRV_H__ +#define __LOONGSON_DRV_H__ … I suggest to omit leading underscores from such identifiers. https://wiki.sei.cmu.edu/confluence/display/c/DCL37-C.+Do

Re: [PATCH v5 1/2] drm/loongson: Introduce component framework support

2024-07-30 Thread Sui Jingfeng
Hi, On 2024/7/29 15:37, Markus Elfring wrote: … +++ b/drivers/gpu/drm/loongson/loongson_drv.c @@ -0,0 +1,298 @@ … +static int loongson_drm_driver_probe(struct platform_device *pdev) +{ … + dev_info(&pdev->dev, "probed\n"); … +} … Do you find such information really relevant? T

[PATCH v5 2/2] drm/loongson: Add dummy gpu driver as a subcomponent

2024-07-28 Thread Sui Jingfeng
before it can register DRM service to user space. The newly introduced component framework allow us to use loose coupling design. Therefore, add a dummy driver for the GPU, it is functional as a subcomponent as well. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/loongson/Makefile | 3

[PATCH v5 1/2] drm/loongson: Introduce component framework support

2024-07-28 Thread Sui Jingfeng
y, as those entities do not belong to the LSDC itself. They are common resources. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/loongson/Makefile | 2 + drivers/gpu/drm/loongson/loongson_device.c| 30 ++ drivers/gpu/drm/loongson/loongson_drv.c | 298 +++ driv

[PATCH v5 0/2] drm/loongson: Introduce component framework support

2024-07-28 Thread Sui Jingfeng
from VRAM to GTT in 13480ms: 36MB/s Also run IGT kms_flip and fbdev tests, no obvious problems found. Sui Jingfeng (2): drm/loongson: Introduce component framework support drm/loongson: Add dummy gpu driver as a subcomponent drivers/gpu/drm/loongson/Makefile | 5 + drivers/gpu/

Re: [PATCH v3 00/19] Add Freescale i.MX8qxp Display Controller support

2024-07-27 Thread Sui Jingfeng
Hi, On 7/28/24 04:28, Dmitry Baryshkov wrote: On Sun, Jul 28, 2024 at 03:10:21AM GMT, Sui Jingfeng wrote: Hi, On 7/28/24 00:39, Dmitry Baryshkov wrote: Hi, This patch series aims to add Freescale i.MX8qxp Display Controller support. The controller is comprised of three main components that

Re: [PATCH v3 00/19] Add Freescale i.MX8qxp Display Controller support

2024-07-27 Thread Sui Jingfeng
Hi, On 7/28/24 00:39, Dmitry Baryshkov wrote: Hi, This patch series aims to add Freescale i.MX8qxp Display Controller support. The controller is comprised of three main components that include a blit engine for 2D graphics accelerations, display controller for display output processing, as wel

Re: [PATCH v4] drm/loongson: Introduce component framework support

2024-07-24 Thread Sui Jingfeng
Hi, On 7/24/24 15:30, Markus Elfring wrote: In some display subsystems, the functionality of a PCIe device may too might be? … of the dirver is loaded, … driver? … its dependencies ready before it can register

[PATCH v4 1/1] drm/loongson: Introduce component framework support

2024-07-23 Thread Sui Jingfeng
and power management part to loongson drm proxy, as they do not belong to the LSDC itself. While at it, also do some cleanups. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/loongson/Makefile | 6 + drivers/gpu/drm/loongson/loonggpu_pci_drv.c | 163 drivers/gpu/drm/loongso

[PATCH v4 0/1] drm/loongson: Introduce component framework support

2024-07-23 Thread Sui Jingfeng
B/s Copy bo of 8100KiB 60 times from GTT to VRAM in 104ms: 4673MB/s Copy bo of 8100KiB 60 times from VRAM to GTT in 13480ms: 36MB/s Also run IGT kms_flip and fbdev tests, no obvious problem found. Sui Jingfeng (1): drm/loongson: Introduce component framework support drivers/gpu/drm/loo

[PATCH v3 0/1]drm/loongson: Introduce component framework support

2024-07-11 Thread Sui Jingfeng
61] loongson :00:06.1: [drm] fb0: loongsondrmfb frame buffer device Sui Jingfeng (1): drm/loongson: Introduce component framework support drivers/gpu/drm/loongson/Makefile | 5 + drivers/gpu/drm/loongson/loonggpu_pci_drv.c | 156 drivers/gpu/drm/loongson/loonggpu_pc

[PATCH v3 1/1] drm/loongson: Introduce component framework support

2024-07-11 Thread Sui Jingfeng
DEFER' back to the driver core if it needs to do so. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/loongson/Makefile | 5 + drivers/gpu/drm/loongson/loonggpu_pci_drv.c | 156 drivers/gpu/drm/loongson/loonggpu_pci_drv.h | 33 +++ drivers/gpu/drm/loong

Re: [etnaviv-next v14 0/8] drm/etnaviv: Add driver wrapper for vivante GPUs attached on PCI(e) device

2024-06-25 Thread Sui Jingfeng
Hi, On 6/25/24 11:18, Icenowy Zheng wrote: 在 2024-05-20星期一的 00:53 +0800,Sui Jingfeng写道: drm/etnaviv use the component framework to bind multiple GPU cores to a virtual master, the virtual master is manually create during driver load time. This works well for various SoCs, yet there are some

Re: [PATCH v3] software node: Implement device_get_match_data fwnode callback

2024-06-23 Thread Sui Jingfeng
Hi, On 6/23/24 03:29, Dmitry Torokhov wrote: In case of non-OF match (which includes the case where you use software nodes) the match data is coming from matching spi_device_id entry in the driver. We don't care about much how it is probed now, rather, after the driver probed by a non-OF way,

Re: [PATCH v3] software node: Implement device_get_match_data fwnode callback

2024-06-22 Thread Sui Jingfeng
Hi, On 6/22/24 03:58, Dmitry Torokhov wrote: Hi Sui, On Sun, Apr 28, 2024 at 04:36:50AM +0800, Sui Jingfeng wrote: Because the software node backend of the fwnode API framework lacks an implementation for the .device_get_match_data function callback. This makes it difficult to use(and/or test

Re: [PATCH v8 3/3] drm/mediatek: Implement OF graphs support for display paths

2024-06-18 Thread Sui Jingfeng
d-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno Acked-by: Sui Jingfeng

Re: [v4,1/2] drm/bridge: sii902x: Fix mode_valid hook

2024-05-31 Thread Sui Jingfeng
Hi, Jayesh On 5/31/24 21:33, Sam Ravnborg wrote: Hi Jayesh, + static const struct drm_bridge_funcs sii902x_bridge_funcs = { .attach = sii902x_bridge_attach, .mode_set = sii902x_bridge_mode_set, @@ -516,6 +529,7 @@ static const struct drm_bridge_funcs sii902x_bridge_funcs =

Re: [v4,1/2] drm/bridge: sii902x: Fix mode_valid hook

2024-05-31 Thread Sui Jingfeng
ncoder has this flag enabled. So move the mode_valid hook to drm_bridge_funcs with proper clock checks for maximum and minimum pixel clock supported by the bridge. Signed-off-by: Jayesh Choudhary Acked-by: Sui Jingfeng --- drivers/gpu/drm/bridge/sii902x.c | 32 +++---

Re: [PATCH v4 0/2] Add mode_valid and atomic_check hooks for sii902x bridge

2024-05-31 Thread Sui Jingfeng
Hi, On 5/30/24 17:29, Jayesh Choudhary wrote: Move the mode_valid hook to drm_bridge_funcs structure to take care of the case when the encoder attaches the bridge chain with the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag in which case, the connector is not initialized in the bridge's attach call and mo

Re: MAINTAINERS: drm: Drop sam as panel reviewer

2024-05-31 Thread Sui Jingfeng
Hi, On 5/31/24 05:14, Sam Ravnborg wrote: Drop myself as reviewer of panel patches, to reflect the reality. We lost one kindness reviewer for drivers of panel, unhappy! Not sure if it is proper to give you a NAK here. :( Best regards, Sui Signed-off-by: Sam Ravnborg Cc: Neil Armstrong --

Re: [resend,v2] drm: renesas: shmobile: Call drm_helper_force_disable_all() at shutdown time

2024-05-29 Thread Sui Jingfeng
isable_all/drm_atomic_helper_shutdown/] [geert: shmob_drm_remove() already calls drm_atomic_helper_shutdown] Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Reviewed-by: Sui Jingfeng Best regards, Sui

Re: drm: renesas: rcar-du: Add drm_panic support for non-vsp

2024-05-29 Thread Sui Jingfeng
: Acked-by: Sui Jingfeng --- Tested on Koelsch (R-Car M2-W). Support for DU variants using the VSP-compositor is more convoluted, and left to the DU experts. --- drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a

Re: drm: renesas: shmobile: Add drm_panic support

2024-05-29 Thread Sui Jingfeng
Hi, On 5/27/24 21:34, Geert Uytterhoeven wrote: Add support for the drm_panic module, which displays a message on the screen when a kernel panic occurs. Signed-off-by: Geert Uytterhoeven Reviewed-by: Jocelyn Falempe Acked-by: Sui Jingfeng --- Tested on Armadillo-800-EVA. --- drivers

Re: drm/tests: Add a missing Kconfig select

2024-05-29 Thread Sui Jingfeng
R [=n] Selected by [y]: - DRM_KUNIT_TEST [=y] && HAS_IOMEM [=y] && DRM [=y] && KUNIT [=y] && MMU [=y] Signed-off-by: Thomas Hellström Fixes: 54cb39e2293b ("drm/connector: hdmi: Create an HDMI sub-state") Cc: Maxime Ripard Cc: dri-devel@lists.freedesktop.org Acked-by: Sui Jingfeng

Re: [v15,06/29] drm/tests: Add output bpc tests

2024-05-27 Thread Sui Jingfeng
Hi, On 5/27/24 21:57, Maxime Ripard wrote: Now that we're tracking the output bpc count in the connector state, let's add a few tests to make sure it works as expected. Reviewed-by: Dave Stevenson Reviewed-by: Dmitry Baryshkov Signed-off-by: Maxime Ripard Tested-by: Sui Jingfeng

Re: [v15,06/29] drm/tests: Add output bpc tests

2024-05-27 Thread Sui Jingfeng
0x02, 0x03, 0x1b, 0x81, + 0xe3, 0x05, 0x00, 0x20, 0x41, 0x10, 0xe2, 0x00, 0x4a, 0x6d, 0x03, 0x0c, + 0x00, 0x12, 0x34, 0x00, 0x28, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xd0 +}; + +#endif // DRM_KUNIT_EDID_H_ -- Best regards Sui Jingfeng

Re: [PATCH v6 02/10] drm/bridge: Set firmware node of drm_bridge instances automatically

2024-05-26 Thread Sui Jingfeng
the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Sui-Jingfeng/drm-bridge-Allow-using-fwnode-APIs-to-ge

Re: [PATCH v6 02/10] drm/bridge: Set firmware node of drm_bridge instances automatically

2024-05-26 Thread Sui Jingfeng
Hi, On 5/27/24 05:19, Dmitry Baryshkov wrote: On Mon, May 27, 2024 at 04:21:07AM +0800, Sui Jingfeng wrote: Normally, the drm_bridge::of_node won't be used by bridge driver instances themselves. Rather, it is mainly used by other modules to find associated drm bridge drvier. Therefore, a

[PATCH v6 10/10] drm/bridge: ch7033: Switch to use fwnode based APIs

2024-05-26 Thread Sui Jingfeng
Use the freshly created helper to replace the use of DT-dependent APIs, also print error log if the fwnode graph is not complete which is benefit to debug. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/bridge/chrontel-ch7033.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions

[PATCH v6 08/10] drm/bridge: tfp410: Use fwnode APIs to acquire device properties

2024-05-26 Thread Sui Jingfeng
Make this driver less DT-dependent by calling the newly created helpers, also switch to use fwnode APIs to acquire additional device properties. No functional changes for DT-based systems. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/bridge/ti-tfp410.c | 39 +++--- 1

[PATCH v6 09/10] drm/bridge: sii9234: Use fwnode APIs to abstract DT dependent API away

2024-05-26 Thread Sui Jingfeng
and avoid directly referencing and/or dereferencing it. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/bridge/sii9234.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/sii9234.c b/drivers/gpu/drm/bridge/sii9234.c index 7d2bbc31bac9..d930c093abb3 10

[PATCH v6 07/10] drm-bridge: it66121: Use fwnode APIs to acquire device properties

2024-05-26 Thread Sui Jingfeng
Make this driver less DT-dependent by calling the newly created helpers, also switch to use fwnode APIs to acquire additional device properties. A side benifit is that boilerplates get reduced, no functional changes for DT-based systems. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/bridge

[PATCH v6 06/10] drm/bridge: sii902x: Switch to use fwnode APIs to acquire device properties

2024-05-26 Thread Sui Jingfeng
Make this driver less DT-dependent by calling the freshly created helpers, also switch to use fwnode APIs to acquire additional device properties. One side benifit is that boilerplates get reduced, no functional changes for DT-based systems. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm

[PATCH v6 05/10] drm/bridge: display-connector: Use fwnode APIs to acquire device properties

2024-05-26 Thread Sui Jingfeng
Switch to use the fwnode APIs, which is a fundamental step to make this driver OF-independent possible. No functional changes for DT-based systems. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/bridge/display-connector.c | 23 +++--- 1 file changed, 11 insertions(+), 12

[PATCH v6 02/10] drm/bridge: Set firmware node of drm_bridge instances automatically

2024-05-26 Thread Sui Jingfeng
y both of drm_bridge_add() and devm_drm_bridge_add(). A lot of driver instances has already added it into their derived structure, promote it into drm_bridge core helps to reduce a batch of boilerplates. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 3 +-- .../gpu/drm/brid

[PATCH v6 04/10] drm/bridge: simple-bridge: Use fwnode APIs to acquire device properties

2024-05-26 Thread Sui Jingfeng
Make this driver less DT-dependent by calling the newly created helpers, also switch to use fwnode APIs to acquire additional device properties. A side benifit is that boilerplates get reduced, no functional changes for DT-based systems. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/bridge

[PATCH v6 03/10] drm/bridge: Implement of_drm_find_bridge() on the top of drm_bridge_find_by_fwnode()

2024-05-26 Thread Sui Jingfeng
Before applying this patch, people may worry about the OF and non-OF API will have a risk to diverge. Eliminate the risk by reimplement the of_drm_find_bridge() on the top of drm_bridge_find_by_fwnode(). As for now the fundamental searching method is unique. Signed-off-by: Sui Jingfeng

[PATCH v6 01/10] drm/bridge: Allow using fwnode APIs to get the next bridge

2024-05-26 Thread Sui Jingfeng
Note, the involved drm bridge instance should also has the fwnode assigned, so that the user of it could find it via the fwnode handle. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/drm_bridge.c | 74 include/drm/drm_bridge.h | 11 +- 2 files ch

[PATCH v6 00/10] drm/bridge: Allow using fwnode API to get the next bridge

2024-05-26 Thread Sui Jingfeng
message and function comments v4 -> v5: * Modify sii9234, ch7033 and ANX7688 * Trivial fixes v5 -> v6: * Implement the same thing with no boilerplate introduced * Add 'struct device *' field to the drm_bridge structure * Re-implement of_drm_find_

[PATCH v2 3/3] drm/loongson: Add dummy gpu driver as a subcomponent

2024-05-26 Thread Sui Jingfeng
subcomponent as well. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/loongson/Makefile| 3 + drivers/gpu/drm/loongson/loong_gpu_pci_drv.c | 90 drivers/gpu/drm/loongson/loong_gpu_pci_drv.h | 27 ++ drivers/gpu/drm/loongson/loongson_module.c | 9 ++ drivers/gpu

[PATCH v2 2/3] drm/loongson: Introduce component framework support

2024-05-26 Thread Sui Jingfeng
bind until all submodules are ready. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/loongson/Makefile | 1 + drivers/gpu/drm/loongson/loongson_module.c| 17 +- drivers/gpu/drm/loongson/loongson_module.h| 1 + drivers/gpu/drm/loongson/lsdc_drv.c | 205 ++

[PATCH v2 1/3] drm/loongson: Add a helper for creating child devices

2024-05-26 Thread Sui Jingfeng
dependency problems if not process correctly. Add the loongson_create_platform_device() function, which allows the KMS driver to create sub-devices for it. The manually created decice acts as agents for the principal part, migrate the potential issue to submodule. Signed-off-by: Sui Jingfeng --- d

[PATCH v2 0/3] drm/loongson: Introduce component framework support

2024-05-26 Thread Sui Jingfeng
. This allows the master don't have to tear down everything, thereore majority setups work can be preserved. The potential cyclic dependency problem can be solved then. v1 -> v2: * Squash patch 0002 and patch 0003 into one * Fill type and improve commit message Sui Jin

Re: [v14,06/28] drm/tests: Add output bpc tests

2024-05-23 Thread Sui Jingfeng
Hi, Maxime I love you patch, yet it generates warnning calltrace. Despite it's just a warning but it can overwhelm when we run kunit tests. Hence, I suggest switch to the drm_atomic_connector_get_property() function. Logs are pasted as below for easier to ready. [ cut here ]-

Re: [v5,3/3] drm/mediatek: Implement OF graphs support for display paths

2024-05-22 Thread Sui Jingfeng
h, &data->third_len); + if (ret) + return ret; + } + + return 0; +} + -- Best regards Sui Jingfeng

Re: [v5,3/3] drm/mediatek: Implement OF graphs support for display paths

2024-05-22 Thread Sui Jingfeng
return 0; + } + return ret; + } + + ret = mtk_ddp_comp_get_id(ep_dev_node, comp_type); + if (ret < 0) + return ret; + + /* All ok! Pass the Component ID to the caller. */ + *cid = (unsigned int)ret; + + return 0; +} + -- Best regards Sui Jingfeng

Re: [v5,3/3] drm/mediatek: Implement OF graphs support for display paths

2024-05-22 Thread Sui Jingfeng
Hi, On 5/22/24 19:48, Sui Jingfeng wrote: if the not bridge is not ready 'not' -> 'next'

Re: [v5,3/3] drm/mediatek: Implement OF graphs support for display paths

2024-05-22 Thread Sui Jingfeng
Hi, Looks good to me in overall! On 5/21/24 15:57, AngeloGioacchino Del Regno wrote: It is impossible to add each and every possible DDP path combination for each and every possible combination of SoC and board: right now, this driver hardcodes configuration for 10 SoCs and this is going to gro

Re: [PATCH] drm/bridge: adv7511: Exit interrupt handling when necessary

2024-05-20 Thread Sui Jingfeng
Hi, On 5/20/24 19:13, Dmitry Baryshkov wrote: On Mon, 20 May 2024 at 14:11, Sui Jingfeng wrote: Hi, On 5/20/24 06:11, Dmitry Baryshkov wrote: On Thu, May 16, 2024 at 06:10:06PM +0800, Liu Ying wrote: Commit f3d9683346d6 ("drm/bridge: adv7511: Allow IRQ to share GPIO pins"

Re: [PATCH] drm/bridge: adv7511: Exit interrupt handling when necessary

2024-05-20 Thread Sui Jingfeng
Hi, On 5/20/24 06:11, Dmitry Baryshkov wrote: On Thu, May 16, 2024 at 06:10:06PM +0800, Liu Ying wrote: Commit f3d9683346d6 ("drm/bridge: adv7511: Allow IRQ to share GPIO pins") fails to consider the case where adv7511->i2c_main->irq is zero, i.e., no interrupt requested at all. Without interr

[etnaviv-next v14 8/8] drm/etnaviv: Add support for vivante GPU cores attached via PCIe device

2024-05-19 Thread Sui Jingfeng
, as the PCIe device has already been created by the time the etnaviv.ko is loaded. Hence, bind all of the virtual child to the real master, this design reflects the hardware layout perfectly and is extensible. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/Kconfig | 9

[etnaviv-next v14 7/8] drm/etnaviv: Allow creating subdevices and pass platform specific data

2024-05-19 Thread Sui Jingfeng
that works for ARM-SoC can also works for PCIe cards. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 33 +++ drivers/gpu/drm/etnaviv/etnaviv_drv.h | 9 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/etnaviv

[etnaviv-next v14 6/8] drm/etnaviv: Replace the '&pdev->dev' with 'dev'

2024-05-19 Thread Sui Jingfeng
In the etnaviv_pdev_probe(), etnaviv_gpu_platform_probe() function, the value of '&pdev->dev' has been cached to the 'dev' local auto variable. But part of callers use 'dev' as argument, while the rest use '&pdev->dev'. To keep it consist

[etnaviv-next v14 5/8] drm/etnaviv: Add support for cached coherent caching mode

2024-05-19 Thread Sui Jingfeng
userspace know. Please note that write-combine mapping out of scope of the discussion and therefore is not being addressed. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 3 +++ drivers/gpu/drm/etnaviv/etnaviv_drv.h | 9 + drivers/gpu/drm/etnaviv/etnaviv_gpu.c |

[etnaviv-next v14 4/8] drm/etnaviv: Fix wrong cache property being used for vmap()

2024-05-19 Thread Sui Jingfeng
when trying to vmap a DMABUF") Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c index aa95a5e98374..eed98bb9e

[etnaviv-next v14 3/8] drm/etnaviv: Embed struct drm_device into struct etnaviv_drm_private

2024-05-19 Thread Sui Jingfeng
containing structure. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etnaviv_drv.c| 65 drivers/gpu/drm/etnaviv/etnaviv_drv.h| 7 +++ drivers/gpu/drm/etnaviv/etnaviv_gem.c| 6 +- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 2 +- drivers/gpu/d

[etnaviv-next v14 2/8] drm/etnaviv: Add constructor and destructor for the etnaviv_drm_private structure

2024-05-19 Thread Sui Jingfeng
dedicated helpers introduced, etnaviv_bind() and etnaviv_unbind() gets simplified. Another potential benefit is that we could put the struct drm_device into struct etnaviv_drm_private in the future, which made them share the same life time. Signed-off-by: Sui Jingfeng --- drivers/gpu/drm/etnaviv/etn

  1   2   3   4   5   6   7   8   9   10   >