Re: [PATCH 2/6] PCI/VGA: Deal with PCI VGA compatible devices only

2023-07-22 Thread suijingfeng
Hi, On 2023/7/20 02:26, Bjorn Helgaas wrote: Optimization is fine, but the most important thing here is to be clear about what functional change this patch makes. As I mentioned at [1], if this patch affects the class codes accepted, please make that clear here. Reviewed-by: Mario Limonciello

Re: [PATCH v3 06/15] dt-bindings: display/msm: sc7180-dpu: Describe SM6125

2023-07-22 Thread Marijn Suijten
On 2023-07-20 21:10:52, Marijn Suijten wrote: > On 2023-07-20 01:24:27, Dmitry Baryshkov wrote: > > On Thu, 20 Jul 2023 at 01:09, Marijn Suijten > > wrote: > > > > > > On 2023-07-19 01:06:03, Dmitry Baryshkov wrote: > > > > On 19/07/2023 00:24, Marijn Suijten wrote: > > > > > SM6125 is identical t

Re: [PATCH v6 0/4] Allow disabling all native fbdev drivers and only keeping DRM emulation

2023-07-22 Thread Javier Martinez Canillas
Javier Martinez Canillas writes: > This patch series splits the fbdev core support in two different Kconfig > symbols: FB and FB_CORE. The motivation for this is to allow CONFIG_FB to > be disabled, while still having the the core fbdev support needed for the > CONFIG_DRM_FBDEV_EMULATION to be en

Re: [PATCH 1/6] drm: execution context for GEM buffers v7

2023-07-22 Thread Nathan Chancellor
Hi Christian, On Tue, Jul 11, 2023 at 03:31:17PM +0200, Christian König wrote: > This adds the infrastructure for an execution context for GEM buffers > which is similar to the existing TTMs execbuf util and intended to replace > it in the long term. > > The basic functionality is that we abstrac

[PATCH v14 00/12] Add generic memory shrinker to VirtIO-GPU and Panfrost DRM drivers

2023-07-22 Thread Dmitry Osipenko
This series: 1. Adds common drm-shmem memory shrinker 2. Enables shrinker for VirtIO-GPU driver 3. Switches Panfrost driver to the common shrinker Changelog: v14:- All the prerequisite reservation locking patches landed upstream, previously were a part of this series in v13 and older

[PATCH v14 01/12] drm/shmem-helper: Factor out pages alloc/release from drm_gem_shmem_get/put_pages()

2023-07-22 Thread Dmitry Osipenko
Factor out pages allocation from drm_gem_shmem_get_pages() into drm_gem_shmem_acquire_pages() function and similar for the put_pages() in a preparation for addition of shrinker support to drm-shmem. Once shrinker will be added, the pages_use_count>0 will no longer determine whether pages are pinne

[PATCH v14 05/12] drm/shmem-helper: Add memory shrinker

2023-07-22 Thread Dmitry Osipenko
Introduce common drm-shmem shrinker for DRM drivers. To start using drm-shmem shrinker drivers should do the following: 1. Implement evict() callback of GEM object where driver should check whether object is purgeable or evictable using drm-shmem helpers and perform the shrinking action 2.

[PATCH v14 03/12] drm/shmem-helper: Switch drm_gem_shmem_vmap/vunmap to use pin/unpin

2023-07-22 Thread Dmitry Osipenko
The vmapped pages shall be pinned in memory. Previously get/put pages were implicitly hard-pinning/unpinning the pages. This will no longer be the case with addition of memory shrinker because pages_use_count>0 won't determine anymore whether pages are hard-pinned (they will be soft-pinned), while

[PATCH v14 04/12] drm/shmem-helper: Factor out unpinning part from drm_gem_shmem_purge()

2023-07-22 Thread Dmitry Osipenko
Factor out pages unpinning code from drm_gem_shmem_purge() into new drm_gem_shmem_unpin_pages(). This prepares code for addition of memory shrinker support. The new common function will be used by shrinker for eviction of shmem pages. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_sh

[PATCH v14 09/12] drm/panfrost: Switch to generic memory shrinker

2023-07-22 Thread Dmitry Osipenko
Replace Panfrost's custom memory shrinker with a common drm-shmem memory shrinker. Tested-by: Steven Price # Firefly-RK3288 Reviewed-by: Steven Price Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/panfrost/Makefile | 1 - drivers/gpu/drm/panfrost/panfrost_device.h| 4 -

[PATCH v14 10/12] drm/shmem-helper: Refactor locked/unlocked functions

2023-07-22 Thread Dmitry Osipenko
Add locked/unlocked postfixes to drm-shmem function names to make clear where reservation lock is taken and where not. Add more common helpers to drm_gem_shmem_helper.h Suggested-by: Boris Brezillon Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c | 172 +--

[PATCH v14 02/12] drm/shmem-helper: Add pages_pin_count field

2023-07-22 Thread Dmitry Osipenko
And new pages_pin_count field to struct drm_gem_shmem_object that will determine whether pages are evictable by memory shrinker. The pages will be evictable only when pages_pin_count=0. This patch prepares code for addition of the memory shrinker that will utilize the new field. Signed-off-by: Dmi

[PATCH v14 12/12] drm/gem: Add _unlocked postfix to drm_gem_pin/unpin()

2023-07-22 Thread Dmitry Osipenko
Make clear that drm_gem_pin/unpin() functions take reservation lock by adding _unlocked postfix to the function names. Suggested-by: Boris Brezillon Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem.c | 4 ++-- drivers/gpu/drm/drm_internal.h | 4 ++-- drivers/gpu/drm/drm_prime.c

[PATCH v14 11/12] drm/shmem-helper: Make drm_gem_shmem_print_info() symbol GPL

2023-07-22 Thread Dmitry Osipenko
Make drm_gem_shmem_print_info() exported symbol GPL to make it consistent with the rest of drm-shmem exports. It's the only remaining drm-shmem symbol that isn't GPL. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v14 06/12] drm/shmem-helper: Remove obsoleted is_iomem test

2023-07-22 Thread Dmitry Osipenko
Everything that uses the mapped buffer should by agnostic to is_iomem. The only reason for the is_iomem test is that we're setting shmem->vaddr to the returned map->vaddr. Now that the shmem->vaddr code is gone, remove the obsoleted is_iomem test to clean up the code. Suggested-by: Thomas Zimmerma

[PATCH v14 07/12] drm/shmem-helper: Export drm_gem_shmem_get_pages_sgt_locked()

2023-07-22 Thread Dmitry Osipenko
Export drm_gem_shmem_get_pages_sgt_locked() that will be used by virtio-gpu shrinker during GEM swap-in operation done under the held reservation lock. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c | 3 ++- include/drm/drm_gem_shmem_helper.h | 1 + 2 files changed

[PATCH v14 08/12] drm/virtio: Support memory shrinking

2023-07-22 Thread Dmitry Osipenko
Support generic drm-shmem memory shrinker and add new madvise IOCTL to the VirtIO-GPU driver. BO cache manager of Mesa driver will mark BOs as "don't need" using the new IOCTL to let shrinker purge the marked BOs on OOM, the shrinker will also evict unpurgeable shmem BOs from memory if guest suppor

[PATCH v2] drm/panfrost: Sync IRQ by job's timeout handler

2023-07-22 Thread Dmitry Osipenko
Panfrost IRQ handler may stuck for a long time, for example this happens when there is a bad HDMI connection and HDMI handler takes a long time to finish processing, holding Panfrost. Make Panfrost's job timeout handler to sync IRQ before checking fence signal status in order to prevent spurious jo

[PATCH] drm/msm: Slightly simplify memory allocation in submit_lookup_cmds()

2023-07-22 Thread Christophe JAILLET
If 'sz' is SIZE_MAX, kmalloc() will fail. So there is no need to explicitly check for an hypothetical overflow. Remove the check to save a few lines of code. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/msm/msm_gem_submit.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) di