[PATCH v2 1/8] drm/virtio: Correct drm_gem_shmem_get_sg_table() error handling

2022-03-14 Thread Dmitry Osipenko
drm_gem_shmem_get_sg_table() never ever returned NULL on error. Correct the error handling to avoid crash on OOM. Cc: sta...@vger.kernel.org Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/virtio/virtgpu_object.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/driver

[PATCH v2 2/8] drm/virtio: Check whether transferred 2D BO is shmem

2022-03-14 Thread Dmitry Osipenko
Transferred 2D BO always must be a shmem BO. Add check for that to prevent NULL dereference if userspace passes a VRAM BO. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.

[PATCH v2 3/8] drm/virtio: Unlock GEM reservations in error code path

2022-03-14 Thread Dmitry Osipenko
Unlock reservations in the error code path of virtio_gpu_object_create() to silence debug warning splat produced by ww_mutex_destroy(&obj->lock) when GEM is released with the held lock. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/virtio/virtgpu_object.c | 2 ++ 1 file changed, 2 insertion

[PATCH v2 5/8] drm/shmem-helper: Correct doc-comment of drm_gem_shmem_get_sg_table()

2022-03-14 Thread Dmitry Osipenko
drm_gem_shmem_get_sg_table() never returns NULL on error, but a ERR_PTR. Correct the doc comment which says that it returns NULL on error. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_gem_shmem_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v2 6/8] drm/shmem-helper: Add generic memory shrinker

2022-03-14 Thread Dmitry Osipenko
Introduce a common DRM SHMEM shrinker. It allows to reduce code duplication among DRM drivers, it also handles complicated lockings for the drivers. This is initial version of the shrinker that covers basic needs of GPU drivers. This patch is based on a couple ideas borrowed from Rob's Clark MSM s

[PATCH v2 7/8] drm/virtio: Support memory shrinking

2022-03-14 Thread Dmitry Osipenko
Add memory shrinker support and new madvise IOCTL to the VirtIO-GPU driver. Userspace (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, thus shrinker will lower memory pressure and prevent OOM kills. For the starter onl

[PATCH v2 8/8] drm/panfrost: Switch to generic memory shrinker

2022-03-14 Thread Dmitry Osipenko
Replace Panfrost's memory shrinker with a generic DRM memory shrinker. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/panfrost/Makefile | 1 - drivers/gpu/drm/panfrost/panfrost_device.h | 4 drivers/gpu/drm/panfrost/panfrost_drv.c| 19 ++- drivers/gpu/drm/panf

[PATCH v2 4/8] drm/virtio: Improve DMA API usage for shmem BOs

2022-03-14 Thread Dmitry Osipenko
DRM API requires the DRM's driver to be backed with the device that can be used for generic DMA operations. The VirtIO-GPU device can't perform DMA operations if it uses PCI transport because PCI device driver creates a virtual VirtIO-GPU device that isn't associated with the PCI. Use PCI's GPU dev

Re: [PATCH v1 0/5] Add memory shrinker to VirtIO-GPU DRM driver

2022-03-14 Thread Dmitry Osipenko
On 3/10/22 01:43, Dmitry Osipenko wrote: >> I think that, given virgl uses host storage, guest shrinker should be >> still useful.. so I think continue with this series. > Guest shrinker indeed will be useful for virgl today. I was already > questioning why virgl needs both host and guest storages,

Re: [Intel-gfx] [PATCH v3 2/3] drm/i915/gem: Remove logic for wbinvd_on_all_cpus

2022-03-14 Thread Michael Cheng
On 2022-03-08 10:58 a.m., Lucas De Marchi wrote: On Tue, Feb 22, 2022 at 08:24:31PM +0100, Thomas Hellström (Intel) wrote: Hi, Michael, On 2/22/22 18:26, Michael Cheng wrote: This patch removes logic for wbinvd_on_all_cpus and brings in drm_cache.h. This header has the logic that outputs a wa

Re: [PATCH v3 8/8] drm: bridge: mcde_dsi: Switch to devm_drm_of_get_bridge

2022-03-14 Thread Linus Walleij
On Tue, Mar 8, 2022 at 9:27 AM Jagan Teki wrote: > devm_drm_of_get_bridge is capable of looking up the downstream > bridge and panel and trying to add a panel bridge if the panel > is found. > > Replace explicit finding calls with devm_drm_of_get_bridge. > > Cc: Linus Walleij > Signed-off-by: Ja

Re: [PATCH v2 8/8] drm/panfrost: Switch to generic memory shrinker

2022-03-14 Thread Alyssa Rosenzweig
On Tue, Mar 15, 2022 at 01:42:53AM +0300, Dmitry Osipenko wrote: > Replace Panfrost's memory shrinker with a generic DRM memory shrinker. > > Signed-off-by: Dmitry Osipenko > --- > drivers/gpu/drm/panfrost/Makefile | 1 - > drivers/gpu/drm/panfrost/panfrost_device.h | 4 > driver

Re: [PATCH v2 8/8] drm/panfrost: Switch to generic memory shrinker

2022-03-14 Thread Dmitry Osipenko
On 3/15/22 02:26, Alyssa Rosenzweig wrote: > On Tue, Mar 15, 2022 at 01:42:53AM +0300, Dmitry Osipenko wrote: >> Replace Panfrost's memory shrinker with a generic DRM memory shrinker. >> >> Signed-off-by: Dmitry Osipenko >> --- >> drivers/gpu/drm/panfrost/Makefile | 1 - >> drivers/gpu/

[PATCH 0/3] i915: General multicast steering updates

2022-03-14 Thread Matt Roper
A few minor steering updates, mostly to prepare for other upcoming work. We'll soon be doing most of our steering explicitly, rather than relying on implicit steering as we do now, so reporting the steering assignments in debugfs will be helpful for debugging. We also have some features coming up

[PATCH 1/3] drm/i915: Report steering details in debugfs

2022-03-14 Thread Matt Roper
Add a new 'steering' node in each gt's debugfs directory that tells whether we're using explicit steering for various types of MCR ranges and, if so, what MMIO ranges it applies to. We're going to be transitioning away from implicit steering, even for slice/dss steering soon, so the information re

[PATCH 2/3] drm/i915/guc: add steering info to GuC register save/restore list

2022-03-14 Thread Matt Roper
From: Daniele Ceraolo Spurio GuC has its own steering mechanism and can't use the default set by i915, so we need to provide the steering information that the FW will need to save/restore registers while processing an engine reset. The GUC interface allows us to do so as part of the register save

[PATCH 3/3] drm/i915: Add support for steered register writes

2022-03-14 Thread Matt Roper
Upcoming patches will need to steer writes to multicast registers as well as reading them. Although the setting of the 'multicast' bit should only really matter for write operations (reads always operate in a unicast manner and give us the result from one specific instance), Wa_22013088509 suggest

Re: [PATCH v2 1/2] dt-bindings: pinctrl: aspeed: Update gfx node in example

2022-03-14 Thread Linus Walleij
On Fri, Mar 4, 2022 at 1:03 AM Joel Stanley wrote: > The example needs updating to match the to be added yaml bindings for > the gfx node. > > Signed-off-by: Joel Stanley Reviewed-by: Linus Walleij I guess you will merge this elsewhere or shall I apply it to the pinctrl tree? Yours, Linus Wa

Re: [PATCH v2 1/2] dt-bindings: pinctrl: aspeed: Update gfx node in example

2022-03-14 Thread Joel Stanley
On Tue, 15 Mar 2022 at 01:21, Linus Walleij wrote: > > On Fri, Mar 4, 2022 at 1:03 AM Joel Stanley wrote: > > > The example needs updating to match the to be added yaml bindings for > > the gfx node. > > > > Signed-off-by: Joel Stanley > > Reviewed-by: Linus Walleij > > I guess you will merge t

[PATCH] drm/i915: Reduce stack usage in debugfs due to SSEU

2022-03-14 Thread Matt Roper
From: John Harrison sseu_dev_info is already a pretty large structure which will likely continue to grow when future platforms increase potential DSS and EU counts. Let's switch the stack placement of this structure in debugfs with a dynamic allocation. Signed-off-by: John Harrison Signed-off-

Re: [PATCH 00/30] fix typos in comments

2022-03-14 Thread Martin K. Petersen
Julia, > drivers/scsi/aic7xxx/aicasm/aicasm.c|2 +- > drivers/scsi/elx/libefc_sli/sli4.c |2 +- > drivers/scsi/lpfc/lpfc_mbox.c |2 +- > drivers/scsi/qla2xxx/qla_gs.c |2 +- Applied patches 2, 17, 24, a

[PATCH v4] drm/msm/disp/dpu1: add inline rotation support for sc7280 target

2022-03-14 Thread Vinod Polimera
- Some DPU versions support inline rot90. It is supported only for limited amount of UBWC formats. - There are two versions of inline rotators, v1 (present on sm8250 and sm7250) and v2 (sc7280). These versions differ in the list of supported formats and in the scaler possibilities. Changes in RFC:

Re: [PATCH 16/22] drm/tilcdc: Use drm_mode_copy()

2022-03-14 Thread Tomi Valkeinen
On 18/02/2022 12:03, Ville Syrjala wrote: From: Ville Syrjälä struct drm_display_mode embeds a list head, so overwriting the full struct with another one will corrupt the list (if the destination mode is on a list). Use drm_mode_copy() instead which explicitly preserves the list head of the des

Re: [PATCH 1/3] drm/i915: Report steering details in debugfs

2022-03-14 Thread kernel test robot
Hi Matt, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-tip/drm-tip] [also build test WARNING on drm-exynos/exynos-drm-next drm/drm-next next-20220310] [cannot apply to drm-intel/for-linux-next tegra-drm/drm/tegra/for-next airlied/drm-next v5.17-rc8] [If

Re: [PATCH v8 22/24] drm: rockchip: Add VOP2 driver

2022-03-14 Thread Andy Yan
Hi Sascha: On 3/11/22 16:33, Sascha Hauer wrote: From: Andy Yan The VOP2 unit is found on Rockchip SoCs beginning with rk3566/rk3568. It replaces the VOP unit found in the older Rockchip SoCs. This driver has been derived from the downstream Rockchip Kernel and heavily modified: - All nonsta

<    1   2