Re: [PATCH v2] drm/vram-helper: fix function names in vram helper doc

2023-02-28 Thread Thomas Zimmermann
Hi Am 28.02.23 um 02:24 schrieb Luc Ma: Refer to drmm_vram_helper_init() instead of the non-existent drmm_vram_helper_alloc_mm(). Fixes: a5f23a72355d ("drm/vram-helper: Managed vram helpers") Signed-off-by: Luc Ma I didn't notice before: your sender email address has to match the signed-off

[PATCH 1/9] drm: execution context for GEM buffers v3

2023-02-28 Thread Christian König
This adds the infrastructure for an execution context for GEM buffers which is similar to the existinc TTMs execbuf util and intended to replace it in the long term. The basic functionality is that we abstracts the necessary loop to lock many different GEM buffers with automated deadlock and dupli

Common DRM execution context v3

2023-02-28 Thread Christian König
Hi guys, thrid round for those patches. They have been in my queue for nearly a year now because I couldn't find much time to push into this. Danilo wants to use this for his GPU VAs tracker work and Arun needs it for hist secure semaphore work, so we should probably get it reviewed now. Compare

[PATCH 2/9] drm: add drm_exec selftests

2023-02-28 Thread Christian König
Largely just the initial skeleton. Signed-off-by: Christian König --- drivers/gpu/drm/Kconfig | 1 + drivers/gpu/drm/tests/Makefile| 3 +- drivers/gpu/drm/tests/drm_exec_test.c | 73 +++ 3 files changed, 76 insertions(+), 1 deletion(-) create mode

[PATCH 3/9] drm/amdkfd: switch over to using drm_exec

2023-02-28 Thread Christian König
Avoids quite a bit of logic and kmalloc overhead. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h| 5 +- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 302 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 14 + drivers/gpu/drm/amd/amdgpu/a

[PATCH 9/9] drm: move ttm_execbuf_util into vmwgfx

2023-02-28 Thread Christian König
VMWGFX is the only remaining user of this and should probably moved over to drm_exec when it starts using GEM as well. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/Makefile | 4 ++-- drivers/gpu/drm/vmwgfx/Makefile| 2 +- driver

[PATCH 4/9] drm/amdgpu: use drm_exec for GEM and CSA handling

2023-02-28 Thread Christian König
Start using the new component here as well. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c | 42 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 77 +++-- 2 files changed, 53 insertions(+), 66 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 7/9] drm/radeon: switch over to drm_exec

2023-02-28 Thread Christian König
Just a straightforward conversion without any optimization. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon.h| 7 ++-- drivers/gpu/drm/radeon/radeon_cs.c | 45 +- drivers/gpu/drm/radeon/radeon_gem.c| 40 +-- drivers/gp

[PATCH 8/9] drm/qxl: switch to using drm_exec

2023-02-28 Thread Christian König
Just a straightforward conversion without any optimization. Only compile tested for now. Signed-off-by: Christian König --- drivers/gpu/drm/qxl/qxl_drv.h | 7 ++-- drivers/gpu/drm/qxl/qxl_release.c | 67 --- 2 files changed, 38 insertions(+), 36 deletions(-) di

[PATCH 5/9] drm/amdgpu: use drm_exec for MES testing

2023-02-28 Thread Christian König
Start using the new component here as well. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 86 +++-- 1 file changed, 39 insertions(+), 47 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.

[PATCH 6/9] drm/amdgpu: use the new drm_exec object for CS v2

2023-02-28 Thread Christian König
Use the new component here as well and remove the old handling. v2: drop dupplicate handling Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 71 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h | 5 +- d

Re: [PATCH] drm: document TV margin properties

2023-02-28 Thread Pekka Paalanen
On Mon, 27 Feb 2023 12:21:16 + Simon Ser wrote: > Add docs for "{left,right,top,bottom} margin" properties. > > Signed-off-by: Simon Ser > Cc: Maxime Ripard > Cc: Daniel Vetter > Cc: Pekka Paalanen > Cc: Noralf Trønnes > Cc: Mateusz Kwiatkowski > --- > drivers/gpu/drm/drm_connector.c

Re: [PATCH v2] fbdev: chipsfb: Fix error codes in chipsfb_pci_init()

2023-02-28 Thread Thomas Zimmermann
Merged into drm-misc-fixes. Am 27.02.23 um 11:33 schrieb Dan Carpenter: The error codes are not set on these error paths. Fixes: 145eed48de27 ("fbdev: Remove conflicting devices on PCI bus") Signed-off-by: Dan Carpenter Reviewed-by: Thomas Zimmermann --- v2: I accidentally returned -EINVAL in

[PULL] drm-misc-next-fixes

2023-02-28 Thread Thomas Zimmermann
Hi Dave and Daniel, here are 3 more patches from drm-misc-next-fixes. In case there's no drm-next PR before -rc1, I'll cherrypick these changes into drm-misc-fixes later. Best regards Thomas drm-misc-next-fixes-2023-02-28: Short summary of fixes pull: Fixes uninitialized variables in fbdev erro

Re: [PATCH] drm: omapdrm: Do not use helper unininitialized in omap_fbdev_init()

2023-02-28 Thread Thomas Zimmermann
Added to drm-misc-next-fixes. Am 24.02.23 um 18:25 schrieb Nathan Chancellor: Clang warns (or errors with CONFIG_WERROR): ../drivers/gpu/drm/omapdrm/omap_fbdev.c:235:6: error: variable 'helper' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]

Re: [PATCH] drm/shmem-helper: Revert accidental non-GPL export

2023-02-28 Thread Thomas Zimmermann
Added to drm-misc-next-fixes. Am 27.02.23 um 10:04 schrieb Asahi Lina: The referenced commit added a wrapper for drm_gem_shmem_get_pages_sgt(), but in the process it accidentally changed the export type from GPL to non-GPL. Switch it back to GPL. Reported-by: Dmitry Osipenko Fixes: edaa0db

Re: [PATCH] drm/virtio: Add option to disable KMS support

2023-02-28 Thread Javier Martinez Canillas
Gerd Hoffmann writes: Hello Gerd, > On Mon, Feb 27, 2023 at 07:40:11AM -0800, Rob Clark wrote: >> On Sun, Feb 26, 2023 at 10:38 PM Gerd Hoffmann wrote: >> > >> > On Fri, Feb 24, 2023 at 10:02:24AM -0800, Rob Clark wrote: >> > > From: Rob Clark >> > > >> > > Add a build option to disable modese

Re: [PATCH v7 01/15] dma-buf/dma-fence: Add deadline awareness

2023-02-28 Thread Pekka Paalanen
On Mon, 27 Feb 2023 11:35:07 -0800 Rob Clark wrote: > From: Rob Clark > > Add a way to hint to the fence signaler of an upcoming deadline, such as > vblank, which the fence waiter would prefer not to miss. This is to aid > the fence signaler in making power management decisions, like boosting

Re: [PATCH v7 05/15] dma-buf/sync_file: Add SET_DEADLINE ioctl

2023-02-28 Thread Pekka Paalanen
On Mon, 27 Feb 2023 11:35:11 -0800 Rob Clark wrote: > From: Rob Clark > > The initial purpose is for igt tests, but this would also be useful for > compositors that wait until close to vblank deadline to make decisions > about which frame to show. > > The igt tests can be found at: > > https:

Re: [PATCH v7 06/15] dma-buf/sync_file: Support (E)POLLPRI

2023-02-28 Thread Pekka Paalanen
On Mon, 27 Feb 2023 11:35:12 -0800 Rob Clark wrote: > From: Rob Clark > > Allow userspace to use the EPOLLPRI/POLLPRI flag to indicate an urgent > wait (as opposed to a "housekeeping" wait to know when to cleanup after > some work has completed). Usermode components of GPU driver stacks > ofte

Re: [PATCH v7 07/15] dma-buf/sw_sync: Add fence deadline support

2023-02-28 Thread Pekka Paalanen
On Mon, 27 Feb 2023 11:35:13 -0800 Rob Clark wrote: > From: Rob Clark > > This consists of simply storing the most recent deadline, and adding an > ioctl to retrieve the deadline. This can be used in conjunction with > the SET_DEADLINE ioctl on a fence fd for testing. Ie. create various > sw_

[PATCH v8 1/8] Revert "drm: mipi-dsi: Convert logging to drm_* functions."

2023-02-28 Thread Siddh Raman Pant
This reverts commit 1040e424353f5f4d39f6f3aa8723eb3bd6ea6446. It used an incorrect way to use drm_* functions. Only drm_device ptrs should be passed, but the mentioned commit passed mipi_dsi_host ptr. It worked by accident due to macro magic. Reported-by: Jani Nikula Signed-off-by: Siddh Raman P

[PATCH v8 2/8] drm/print: Fix and add support for NULL as first argument in drm_* macros

2023-02-28 Thread Siddh Raman Pant
Comments say macros DRM_DEBUG_* are deprecated in favor of drm_dbg_*(NULL, ...), but they have broken support for it, as the macro will result in `(NULL) ? (NULL)->dev : NULL`. Thus, fix them by separating logic to get dev ptr in a new function, which will return the dev ptr if arg is not NULL. Us

[PATCH v8 0/8] drm: Remove usage of deprecated DRM_* macros

2023-02-28 Thread Siddh Raman Pant
This patchset aims to remove usages of deprecated DRM_* macros from the files residing in drivers/gpu/drm root. In process, I found out that NULL as first argument of drm_dbg_* wasn't working, but it was listed as the alternative in deprecation comment, so I fixed that before removing usages of DR

[PATCH v8 7/8] drm: Remove usage of deprecated DRM_DEBUG_DRIVER

2023-02-28 Thread Siddh Raman Pant
drm_print.h says DRM_DEBUG_DRIVER is deprecated. Thus, use newer drm_dbg_driver(). Also fix the deprecation comment in drm_print.h which mentions drm_dbg() instead of drm_dbg_driver(). Signed-off-by: Siddh Raman Pant --- drivers/gpu/drm/drm_mipi_dbi.c | 10 +- include/drm/drm_print.h

[PATCH v8 4/8] drm: Remove usage of deprecated DRM_NOTE

2023-02-28 Thread Siddh Raman Pant
drm_print.h says DRM_NOTE is deprecated in favor of drm_notice(). Signed-off-by: Siddh Raman Pant --- drivers/gpu/drm/drm_displayid.c | 2 +- drivers/gpu/drm/drm_kms_helper_common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_displayid.c b/d

[PATCH v8 5/8] drm: Remove usage of deprecated DRM_ERROR

2023-02-28 Thread Siddh Raman Pant
drm_print.h says DRM_ERROR is deprecated in favor of drm_err(). Signed-off-by: Siddh Raman Pant --- drivers/gpu/drm/drm_bridge.c | 8 drivers/gpu/drm/drm_bufs.c | 8 drivers/gpu/drm/drm_client_modeset.c | 4 ++-- drivers/gpu/drm/drm_context.c| 4 ++

[PATCH v8 8/8] drm: Remove usage of deprecated DRM_DEBUG_KMS

2023-02-28 Thread Siddh Raman Pant
drm_print.h says DRM_DEBUG_KMS is deprecated in favor of drm_dbg_kms(). Signed-off-by: Siddh Raman Pant --- drivers/gpu/drm/drm_client_modeset.c | 112 ++--- drivers/gpu/drm/drm_color_mgmt.c | 4 +- drivers/gpu/drm/drm_connector.c| 21 ++--- drivers/gpu/drm

[PATCH v8 6/8] drm: Remove usage of deprecated DRM_DEBUG

2023-02-28 Thread Siddh Raman Pant
drm_print.h says DRM_DEBUG is deprecated in favor of drm_dbg_core(). Signed-off-by: Siddh Raman Pant --- drivers/gpu/drm/drm_agpsupport.c | 4 +- drivers/gpu/drm/drm_bufs.c| 114 +++--- drivers/gpu/drm/drm_context.c | 14 ++-- drivers/gpu/drm/drm_dma.c

[PATCH v8 3/8] drm: Remove usage of deprecated DRM_INFO

2023-02-28 Thread Siddh Raman Pant
drm_print.h says DRM_INFO is deprecated in favor of drm_info(). Signed-off-by: Siddh Raman Pant --- drivers/gpu/drm/drm_client_modeset.c | 2 +- drivers/gpu/drm/drm_connector.c | 7 --- drivers/gpu/drm/drm_drv.c| 2 +- drivers/gpu/drm/drm_pci.c| 2 +- 4 files cha

Re: [PATCH v2] drm/vram-helper: fix function names in vram helper doc

2023-02-28 Thread Luc Ma
On Tue, 28 Feb 2023 at 16:11, Thomas Zimmermann wrote: > > Hi > > Am 28.02.23 um 02:24 schrieb Luc Ma: > > Refer to drmm_vram_helper_init() instead of the non-existent > > drmm_vram_helper_alloc_mm(). > > > > Fixes: a5f23a72355d ("drm/vram-helper: Managed vram helpers") > > Signed-off-by: Luc Ma

Re: amdgpu didn't start with pci=nocrs parameter, get error "Fatal error during GPU init"

2023-02-28 Thread Mikhail Gavrilov
On Mon, Feb 27, 2023 at 3:22 PM Christian König > > Unfortunately yes. We could clean that up a bit more so that you don't > run into a BUG() assertion, but what essentially happens here is that we > completely fail to talk to the hardware. > > In this situation we can't even re-enable vesa or text

Re: [PATCH] drm: document TV margin properties

2023-02-28 Thread Simon Ser
On Tuesday, February 28th, 2023 at 09:46, Pekka Paalanen wrote: > can these be negative as well, to achieve overscan and not just > underscan? Did I get overscan and underscan right... these are related > to under/overscan, aren't they? > > Hmm, no, I guess that doesn't make sense, there is no

Re: [PATCH v2 1/1] drm/doc: Document DRM device reset expectations

2023-02-28 Thread Pekka Paalanen
On Mon, 27 Feb 2023 15:40:00 -0500 André Almeida wrote: > Create a section that specifies how to deal with DRM device resets for > kernel and userspace drivers. > > Signed-off-by: André Almeida > --- > Documentation/gpu/drm-uapi.rst | 51 ++ > 1 file changed, 51

Re: [PATCH v2 1/2] drm/vc4: replace drm_gem_dma_object for drm_gem_object in vc4_exec_info

2023-02-28 Thread Javier Martinez Canillas
Maíra Canal writes: Hello Maíra, > The array of BOs that are lookup at the start of exec doesn't need > to be instantiated as drm_gem_dma_object, as it doesn't benefit > from its attributes. So, simplify the code by replacing the array of > drm_gem_dma_object for an array of drm_gem_object in th

Re: [PATCH v2 2/2] drm/vc4: replace obj lookup steps with drm_gem_objects_lookup

2023-02-28 Thread Javier Martinez Canillas
Maíra Canal writes: > As vc4_cl_lookup_bos() performs the same steps as drm_gem_objects_lookup(), > replace the open-coded implementation in vc4 to simply use the DRM function. > > Signed-off-by: Maíra Canal > Reviewed-by: André Almeida > --- It is indeed the same logic. Nice cleanup! Reviewe

Re: [PATCH] drm: document TV margin properties

2023-02-28 Thread Pekka Paalanen
On Tue, 28 Feb 2023 09:53:47 + Simon Ser wrote: > On Tuesday, February 28th, 2023 at 09:46, Pekka Paalanen > wrote: > > > can these be negative as well, to achieve overscan and not just > > underscan? Did I get overscan and underscan right... these are related > > to under/overscan, aren't

Re: [PATCH 1/4] drm/ast: Remove little-endianism from I/O helpers

2023-02-28 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > Replace one call to ast_io_write16() with two calls to ast_io_write8() > in ast_set_index_reg(). The combined 16-bit-wide write of an index > register and the corresponding data register only works on little- > endian systems. Write both registers independent from each

Re: [PATCH 2/4] drm/ast: Rework definition of I/O read and write helpers

2023-02-28 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > Ast defines a number of I/O helpers for accessing hardware. Only 4 of > the many generated functions are actually used. Replace the respective > generator macros with those 4 functions. No functional changes. > > Signed-off-by: Thomas Zimmermann > --- Nice change. It

[PATCH v4 00/12] Panfrost: Improve and add MediaTek SoCs support

2023-02-28 Thread AngeloGioacchino Del Regno
Changes in v4: - Refactored power-domains and power-domain-names exclusions as suggested by Krzysztof - Small changes in MT8192 bindings addition Changes in v3: - Changed MT8186 bindings to declare only two power domains - Added a commit introducing MT8186 specific platform data to panfr

[PATCH v4 01/12] dt-bindings: gpu: mali-bifrost: Split out MediaTek power-domains variation

2023-02-28 Thread AngeloGioacchino Del Regno
In preparation for adding new bindings for new MediaTek SoCs, split out the power-domains variation from the `else` in the current mediatek,mt8183-mali conditional. The sram-supply part is left in place to be disallowed for anything that is not compatible with "mediatek,mt8183-mali" as this regula

[PATCH v4 04/12] dt-bindings: gpu: mali-bifrost: Add sub-schema for MT8192's power domains

2023-02-28 Thread AngeloGioacchino Del Regno
MediaTek MT8192 (and similar) needs five power domains for the Mali GPU and no sram-supply: change the binding to allow so by also introducing power-domain-names in the generic binding; while at it, also disallow the newly introduced power-domain-names for all non-MediaTek bindings. Fixes: 5d82e74

[PATCH v4 02/12] dt-bindings: gpu: mali-bifrost: Set power-domains maxItems to 5

2023-02-28 Thread AngeloGioacchino Del Regno
In preparation for adding (and fixing) power-domain-names and MediaTek MT8192 bindings, allow up to five items for power-domains. Signed-off-by: AngeloGioacchino Del Regno --- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) di

[PATCH v4 10/12] drm/panfrost: Add mediatek,mt8192-mali compatible

2023-02-28 Thread AngeloGioacchino Del Regno
From: Alyssa Rosenzweig Required for Mali-G57 on the Mediatek MT8192 and MT8195, which uses even more power domains than the MT8183 before it. Signed-off-by: Alyssa Rosenzweig [Angelo: Removed unneeded "sram" supply, added mt8195 to commit description] Co-developed-by: AngeloGioacchino Del Regn

[PATCH v4 05/12] dt-bindings: gpu: mali-bifrost: Add new MT8183 compatible

2023-02-28 Thread AngeloGioacchino Del Regno
Since new platform data was required in Panfrost for getting GPU DVFS finally working on MediaTek SoCs, add a new "mediatek,mt8183b-mali" compatible. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Reviewed-by: Chen-Yu Tsai --- Since the changes are small, I kept the Review

[PATCH v4 06/12] dt-bindings: gpu: mali-bifrost: Add support for MediaTek MT8186

2023-02-28 Thread AngeloGioacchino Del Regno
MT8186 has a Mali-G52 MC2 2EE GPU (two cores): add a binding with two power domains (one per core) for it. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Chen-Yu Tsai --- .../bindings/gpu/arm,mali-bifrost.yaml | 18 ++ 1 file changed, 18 insertions(+) diff --gi

[PATCH v4 08/12] drm/panfrost: Increase MAX_PM_DOMAINS to 5

2023-02-28 Thread AngeloGioacchino Del Regno
From: Alyssa Rosenzweig Increase the MAX_PM_DOMAINS constant from 3 to 5, to support the extra power domains required by the Mali-G57 on the MT8192. Signed-off-by: Alyssa Rosenzweig Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_dev

[PATCH v4 12/12] drm/panfrost: Add support for Mali on the MT8186 SoC

2023-02-28 Thread AngeloGioacchino Del Regno
MediaTek MT8186 has a Mali-G52 MC2 2EE (Bifrost): add a new compatible and platform data using the same supplies list as "mt8183_b" (only one regulator), and a new pm_domains list with only two power domains. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price --- drivers/gpu/d

[PATCH v4 07/12] dt-bindings: gpu: mali-bifrost: Add compatible for MT8195 SoC

2023-02-28 Thread AngeloGioacchino Del Regno
The MediaTek MT8195 SoC has a Mali G57 MC5 (Valhall-JM) and has the same number of power domains and requirements as MT8192 in terms of bindings. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 + 1 file

[PATCH v4 09/12] drm/panfrost: Add the MT8192 GPU ID

2023-02-28 Thread AngeloGioacchino Del Regno
From: Alyssa Rosenzweig MediaTek MT8192 has a Mali-G57 with a special GPU ID. Add its GPU ID, but treat it as otherwise identical to a standard Mali-G57. We do _not_ fix up the GPU ID here -- userspace needs to be aware of the special GPU ID, in case we find functional differences between MediaT

[PATCH v4 03/12] dt-bindings: gpu: mali-bifrost: Fix power-domain-names validation

2023-02-28 Thread AngeloGioacchino Del Regno
Commit ("dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183") incorrectly introduced power domain names for MT8183, causing validation issues. Add power-domain-names to the base schema, allowing a maximum of five elements; since platforms having a single power domain don't need any actual domain

[PATCH v4 11/12] drm/panfrost: Add new compatible for Mali on the MT8183 SoC

2023-02-28 Thread AngeloGioacchino Del Regno
The "mediatek,mt8183-mali" compatible uses platform data that calls for getting (and managing) two regulators ("mali" and "sram") but devfreq does not support this usecase, resulting in DVFS not working. Since a lot of MediaTek SoCs need to set the voltages for the GPU SRAM regulator in a specific

Re: [PATCH 3/4] drm/ast: Rename struct ast_private to struct ast_device

2023-02-28 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > The data structure struct ast_private represents an AST device. Its > name comes from the time when it was allocated and stored separately > in struct drm_device.dev_private. The DRM device is now embedded, so > rename struct ast_private to struct ast_device. > > Signe

Re: [PATCH 4/4] drm/ast: Rename to_ast_private() to to_ast_device()

2023-02-28 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > The helper to_ast_private() now upcasts to struct ast_device. Rename > it accordingly. No functional changes. > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

Re: [PATCH] drm/virtio: Add option to disable KMS support

2023-02-28 Thread Dmitry Osipenko
On 2/28/23 12:19, Javier Martinez Canillas wrote: > Gerd Hoffmann writes: > > Hello Gerd, > >> On Mon, Feb 27, 2023 at 07:40:11AM -0800, Rob Clark wrote: >>> On Sun, Feb 26, 2023 at 10:38 PM Gerd Hoffmann wrote: On Fri, Feb 24, 2023 at 10:02:24AM -0800, Rob Clark wrote: > From: Rob Cla

Re: [PATCH] drm: document TV margin properties

2023-02-28 Thread Ville Syrjälä
On Tue, Feb 28, 2023 at 12:12:22PM +0200, Pekka Paalanen wrote: > On Tue, 28 Feb 2023 09:53:47 + > Simon Ser wrote: > > > On Tuesday, February 28th, 2023 at 09:46, Pekka Paalanen > > wrote: > > > > > can these be negative as well, to achieve overscan and not just > > > underscan? Did I get

[PATCH 00/10] drm/i915: move DSC RC tables to drm_dsc_helper.c

2023-02-28 Thread Dmitry Baryshkov
Other platforms (msm) will benefit from sharing the DSC config setup functions. This series moves parts of static DSC config data from the i915 driver to the common helpers to be used by other drivers. Note: the RC parameters were cross-checked against config files found in DSC model 2021062, 2016

[PATCH 01/10] drm/i915/dsc: change DSC param tables to follow the DSC model

2023-02-28 Thread Dmitry Baryshkov
After cross-checking DSC models (20150914, 20161212, 20210623) change values in rc_parameters tables to follow config files present inside the DSC model. Handle two places, where i915 tables diverged from the model, by patching the rc values in the code. Note: I left one case uncorrected, 8bpp/10b

[PATCH 04/10] drm/i915/dsc: stop using interim structure for calculated params

2023-02-28 Thread Dmitry Baryshkov
Stop using an interim structure rc_parameters for storing calculated params and then setting drm_dsc_config using that structure. Instead put calculated params into the struct drm_dsc_config directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/i915/display/intel_vdsc.c | 89 +---

[PATCH 03/10] drm/i915/dsc: move DSC tables to DRM DSC helper

2023-02-28 Thread Dmitry Baryshkov
This moves DSC RC tables to DRM DSC helper. No additional code changes and/or cleanups are a part of this commit, it will be cleaned up in the followup commits. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 364 ++ drivers/gpu/drm/i915/displa

[PATCH 02/10] drm/i915/dsc: move rc_buf_thresh values to common helper

2023-02-28 Thread Dmitry Baryshkov
The rc_buf_thresh values are common to all DSC implementations. Move them to the common helper together with the code to propagage them to the drm_dsc_config. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 37 +++ drivers/gpu/drm/i915/display/

[PATCH 09/10] drm/display/dsc: add helper to set semi-const parameters

2023-02-28 Thread Dmitry Baryshkov
Add a helper setting config values which are typically constant across operating modes (table E-4 of the standard) and mux_word_size (which is a const according to 3.5.2). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 21 + include/drm/display

[PATCH 08/10] drm/display/dsc: add YCbCr 4:2:2 and 4:2:0 RC parameters

2023-02-28 Thread Dmitry Baryshkov
Include RC parameters for YCbCr 4:2:2 and 4:2:0 configurations. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 438 +++ include/drm/display/drm_dsc_helper.h | 2 + 2 files changed, 440 insertions(+) diff --git a/drivers/gpu/drm/display/d

[PATCH 05/10] drm/display/dsc: use flat array for rc_parameters lookup

2023-02-28 Thread Dmitry Baryshkov
Next commits are going to add support for additional RC parameter lookup tables. These tables are going to use different bpp/bpc combinations, thus it makes little sense to keep the 2d array for RC parameters. Switch to using the flat array. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/di

[PATCH 07/10] drm/display/dsc: include the rest of pre-SCR parameters

2023-02-28 Thread Dmitry Baryshkov
DSC model contains pre-SCR RC parameters for other bpp/bpc combinations, include them here for completeness. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 72 1 file changed, 72 insertions(+) diff --git a/drivers/gpu/drm/display/drm_dsc_

[PATCH 06/10] drm/display/dsc: split DSC 1.2 and DSC 1.1 (pre-SCR) parameters

2023-02-28 Thread Dmitry Baryshkov
The array of rc_parameters contains a mixture of parameters from DSC 1.1 and DSC 1.2 standards. Split these tow configuration arrays in preparation to adding more configuration data. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_dsc_helper.c | 127 ++ drive

[PATCH 10/10] drm/msm/dsi: use new helpers for DSC setup

2023-02-28 Thread Dmitry Baryshkov
Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 61 -- 1 file changed, 8 insertions(

gud: set PATH connector property

2023-02-28 Thread Simon Ser
Hi Noralf, Would it be possible to set the PATH connector property based on the USB port used by gud? This would give user-space a persistent identifier for the connector: if the user plugs in a USB display on a given port, the PATH would be the same even if the machine rebooted or the displays w

Re: [PATCH] drm/virtio: Add option to disable KMS support

2023-02-28 Thread Thomas Zimmermann
Hi Am 28.02.23 um 10:19 schrieb Javier Martinez Canillas: Gerd Hoffmann writes: [...] I think it is a bad idea to make that a compile time option, I'd suggest a runtime switch instead, for example a module parameter to ask the driver to ignore any scanouts. I don't think there's a need fo

Re: [PATCH] drm: document TV margin properties

2023-02-28 Thread Dave Stevenson
Hi Pekka On Tue, 28 Feb 2023 at 10:12, Pekka Paalanen wrote: > > On Tue, 28 Feb 2023 09:53:47 + > Simon Ser wrote: > > > On Tuesday, February 28th, 2023 at 09:46, Pekka Paalanen > > wrote: > > > > > can these be negative as well, to achieve overscan and not just > > > underscan? Did I get

[PATCH v2] drm/v3d: New debugfs end-points to query GPU usage stats.

2023-02-28 Thread Jose Maria Casanova Crespo
Two new debugfs interfaces are implemented to expose the usage stats of the GPU scheduling queues. - gpu_usage: exposes the total runtime since boot of each of the 5 scheduling queues available at V3D (BIN, RENDER, CSD, TFU, CACHE_CLEAN). So if the interface is queried at two different points of t

Re: [PATCH] drm: document TV margin properties

2023-02-28 Thread Ville Syrjälä
On Tue, Feb 28, 2023 at 11:37:38AM +, Dave Stevenson wrote: > Hi Pekka > > On Tue, 28 Feb 2023 at 10:12, Pekka Paalanen wrote: > > > > On Tue, 28 Feb 2023 09:53:47 + > > Simon Ser wrote: > > > > > On Tuesday, February 28th, 2023 at 09:46, Pekka Paalanen > > > wrote: > > > > > > > can t

Re: [PATCH v2 3/8] accel/qaic: Add MHI controller

2023-02-28 Thread Stanislaw Gruszka
On Mon, Feb 06, 2023 at 08:41:40AM -0700, Jeffrey Hugo wrote: > + mhi_cntl = kzalloc(sizeof(*mhi_cntl), GFP_KERNEL); [snip] > + mhi_cntl->irq = kmalloc(sizeof(*mhi_cntl->irq), GFP_KERNEL); I recommend usage of devm_kzalloc(), devm_kmalloc() for those to simplify error and exit paths. Rega

Re: [PATCH] drm: document TV margin properties

2023-02-28 Thread Dave Stevenson
On Tue, 28 Feb 2023 at 11:45, Ville Syrjälä wrote: > > On Tue, Feb 28, 2023 at 11:37:38AM +, Dave Stevenson wrote: > > Hi Pekka > > > > On Tue, 28 Feb 2023 at 10:12, Pekka Paalanen wrote: > > > > > > On Tue, 28 Feb 2023 09:53:47 + > > > Simon Ser wrote: > > > > > > > On Tuesday, February

Re: [PATCH] drm/virtio: Add option to disable KMS support

2023-02-28 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > Hi > > Am 28.02.23 um 10:19 schrieb Javier Martinez Canillas: >> Gerd Hoffmann writes: > [...] >>> >>> I think it is a bad idea to make that a compile time option, I'd suggest >>> a runtime switch instead, for example a module parameter to ask the >>> driver to ignore

Re: [PATCH v13 04/18] drm: exynos: dsi: Switch to DSI panel or bridge find helper

2023-02-28 Thread Maxime Ripard
On Tue, Feb 28, 2023 at 02:08:53AM +0530, Jagan Teki wrote: > On Tue, Feb 28, 2023 at 1:40 AM Marek Vasut wrote: > > > > On 2/27/23 20:49, Jagan Teki wrote: > > > On Tue, Feb 28, 2023 at 1:11 AM Marek Vasut wrote: > > >> > > >> On 2/27/23 20:34, Jagan Teki wrote: > > >>> On Tue, Feb 28, 2023 at 1

Re: [PATCH] drm: document TV margin properties

2023-02-28 Thread Ville Syrjälä
On Tue, Feb 28, 2023 at 11:52:54AM +, Dave Stevenson wrote: > On Tue, 28 Feb 2023 at 11:45, Ville Syrjälä > wrote: > > > > On Tue, Feb 28, 2023 at 11:37:38AM +, Dave Stevenson wrote: > > > Hi Pekka > > > > > > On Tue, 28 Feb 2023 at 10:12, Pekka Paalanen wrote: > > > > > > > > On Tue, 28

Re: [PATCH v13 04/18] drm: exynos: dsi: Switch to DSI panel or bridge find helper

2023-02-28 Thread Maxime Ripard
On Mon, Feb 27, 2023 at 08:41:22PM +0100, Marek Vasut wrote: > > If we go ahead with no need for DRM-managed helper at the moment, then > > find the panel hook in host.attach and then drop 2/18. > > The panel lookup must happen in .bind/.probe for exynos/imx respectively , > that's really all that

Re: [PATCH] drm: document TV margin properties

2023-02-28 Thread Simon Ser
On Tuesday, February 28th, 2023 at 12:28, Ville Syrjälä wrote: > > > > Is this instead not scaling anything but simply sending metadata > > > > through the connector? > > > > > > No metadata is sent. This is purely equivalent to setting up CRTC_* > > > properties to scale the planes. > > My wi

Re: [PATCH] drm/virtio: Add option to disable KMS support

2023-02-28 Thread Thomas Zimmermann
Hi Am 24.02.23 um 19:02 schrieb Rob Clark: From: Rob Clark Add a build option to disable modesetting support. This is useful in cases where the guest only needs to use the GPU in a headless mode, or (such as in the CrOS usage) window surfaces are proxied to a host compositor. We've just bee

Re: [PATCH] drm: document TV margin properties

2023-02-28 Thread Pekka Paalanen
On Tue, 28 Feb 2023 13:28:48 +0200 Ville Syrjälä wrote: > On Tue, Feb 28, 2023 at 12:12:22PM +0200, Pekka Paalanen wrote: > > Oh! That would be really good to mention in the doc. Maybe even prefer > > plane props over this? Or is this for analog TV, and plane props for > > digital TV? > > Pla

Re: [PATCH 02/10] drm/i915/dsc: move rc_buf_thresh values to common helper

2023-02-28 Thread Jani Nikula
On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > The rc_buf_thresh values are common to all DSC implementations. Move > them to the common helper together with the code to propagage them to > the drm_dsc_config. > > Signed-off-by: Dmitry Baryshkov > --- > drivers/gpu/drm/display/drm_dsc_helper.c

Re: [PATCH] drm: document TV margin properties

2023-02-28 Thread Ville Syrjälä
On Tue, Feb 28, 2023 at 02:24:23PM +0200, Pekka Paalanen wrote: > On Tue, 28 Feb 2023 13:28:48 +0200 > Ville Syrjälä wrote: > > > On Tue, Feb 28, 2023 at 12:12:22PM +0200, Pekka Paalanen wrote: > > > > Oh! That would be really good to mention in the doc. Maybe even prefer > > > plane props over

[PATCH v2] drm: document connector margin properties

2023-02-28 Thread Simon Ser
Add docs for "{left,right,top,bottom} margin" properties. v2: - Mention the purpose: mitigate underscan on TVs - Move out of analog TV section into standard props (Pekka) - Mention HDMI AVI InfoFrames (Pekka, Ville) Signed-off-by: Simon Ser Cc: Maxime Ripard Cc: Daniel Vetter Cc: Pekka Paalane

Re: [PATCH v13 04/18] drm: exynos: dsi: Switch to DSI panel or bridge find helper

2023-02-28 Thread Jagan Teki
On Tue, Feb 28, 2023 at 5:40 PM Maxime Ripard wrote: > > On Mon, Feb 27, 2023 at 08:41:22PM +0100, Marek Vasut wrote: > > > If we go ahead with no need for DRM-managed helper at the moment, then > > > find the panel hook in host.attach and then drop 2/18. > > > > The panel lookup must happen in .b

Re: [PATCH v3] drm/virtio: Add option to disable KMS support

2023-02-28 Thread Thomas Zimmermann
Hi Am 27.02.23 um 19:15 schrieb Rob Clark: On Mon, Feb 27, 2023 at 9:57 AM Dmitry Osipenko wrote: On 2/27/23 20:38, Rob Clark wrote: ... + if (IS_ENABLED(CONFIG_DRM_VIRTIO_GPU_KMS)) { + /* get display info */ + virtio_cread_le(vgdev->vdev, struct virtio_gpu_config

Re: [PATCH 02/10] drm/i915/dsc: move rc_buf_thresh values to common helper

2023-02-28 Thread Dmitry Baryshkov
On Tue, 28 Feb 2023 at 14:25, Jani Nikula wrote: > > On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > > The rc_buf_thresh values are common to all DSC implementations. Move > > them to the common helper together with the code to propagage them to > > the drm_dsc_config. > > > > Signed-off-by: Dmitr

Re: gud: set PATH connector property

2023-02-28 Thread Peter Stuge
Hi Simon, Simon Ser wrote: > Would it be possible to set the PATH connector property based on the > USB port used by gud? Sadly not really easily. The physical topology underneath each host controller is stable but bus numbers (usb1, usb2 etc.) are not. For onboard host controllers it could be

Re: [PATCH v7 00/15] dma-fence: Deadline awareness

2023-02-28 Thread Bagas Sanjaya
On Mon, Feb 27, 2023 at 11:35:06AM -0800, Rob Clark wrote: > From: Rob Clark > > This series adds a deadline hint to fences, so realtime deadlines > such as vblank can be communicated to the fence signaller for power/ > frequency management decisions. > > This is partially inspired by a trick i9

Re: amdgpu didn't start with pci=nocrs parameter, get error "Fatal error during GPU init"

2023-02-28 Thread Christian König
Am 28.02.23 um 10:52 schrieb Mikhail Gavrilov: On Mon, Feb 27, 2023 at 3:22 PM Christian König Unfortunately yes. We could clean that up a bit more so that you don't run into a BUG() assertion, but what essentially happens here is that we completely fail to talk to the hardware. In this situati

Re: gud: set PATH connector property

2023-02-28 Thread Simon Ser
On Tuesday, February 28th, 2023 at 13:31, Peter Stuge wrote: > > Would it be possible to set the PATH connector property based on the > > USB port used by gud? > > Sadly not really easily. > > The physical topology underneath each host controller is stable but > bus numbers (usb1, usb2 etc.) ar

Re: [PATCH v2] drm: document connector margin properties

2023-02-28 Thread Ville Syrjälä
On Tue, Feb 28, 2023 at 12:32:04PM +, Simon Ser wrote: > Add docs for "{left,right,top,bottom} margin" properties. > > v2: > - Mention the purpose: mitigate underscan on TVs > - Move out of analog TV section into standard props (Pekka) > - Mention HDMI AVI InfoFrames (Pekka, Ville) > > Signed

Re: [PATCH v2] drm: document connector margin properties

2023-02-28 Thread Pekka Paalanen
On Tue, 28 Feb 2023 12:32:04 + Simon Ser wrote: > Add docs for "{left,right,top,bottom} margin" properties. > > v2: > - Mention the purpose: mitigate underscan on TVs > - Move out of analog TV section into standard props (Pekka) > - Mention HDMI AVI InfoFrames (Pekka, Ville) > > Signed-off-

Re: [PATCH v3] drm/virtio: Add option to disable KMS support

2023-02-28 Thread Gerd Hoffmann
Hi, > + if (!vgdev->num_scanouts) { > + /* > + * Having an EDID but no scanouts is non-sensical, > + * but it is permitted to have no scanouts and no > + * EDID (in which case DRIVER_MODESET and > +

Re: [PATCH v3] drm/virtio: Add option to disable KMS support

2023-02-28 Thread Thomas Zimmermann
Am 28.02.23 um 13:34 schrieb Thomas Zimmermann: Hi Am 27.02.23 um 19:15 schrieb Rob Clark: On Mon, Feb 27, 2023 at 9:57 AM Dmitry Osipenko wrote: On 2/27/23 20:38, Rob Clark wrote: ... + if (IS_ENABLED(CONFIG_DRM_VIRTIO_GPU_KMS)) { + /* get display info */ + vi

Re: [PATCH 02/10] drm/i915/dsc: move rc_buf_thresh values to common helper

2023-02-28 Thread Jani Nikula
On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: > On Tue, 28 Feb 2023 at 14:25, Jani Nikula wrote: >> >> On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: >> > The rc_buf_thresh values are common to all DSC implementations. Move >> > them to the common helper together with the code to propagage them to

[PATCH] drm/shmem-helper: Fix compile error

2023-02-28 Thread Andi Shyti
Commit 67b7836d4458 ("drm/shmem-helper: Switch to reservation lock") removes the drm_gem_shmem_get_pages_locked() and drm_gem_shmem_put_pages_locked(). But then commit edaa0db9 ("drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()") reintroduces it. Somehow these two commits got m

Re: [PATCH 02/10] drm/i915/dsc: move rc_buf_thresh values to common helper

2023-02-28 Thread Dmitry Baryshkov
On 28/02/2023 14:49, Jani Nikula wrote: On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: On Tue, 28 Feb 2023 at 14:25, Jani Nikula wrote: On Tue, 28 Feb 2023, Dmitry Baryshkov wrote: The rc_buf_thresh values are common to all DSC implementations. Move them to the common helper together with th

Re: [Intel-gfx] [PATCH] drm/i915/mtl: Apply Wa_14017073508 for MTL SoC Step

2023-02-28 Thread Nilawar, Badal
Hi Matt, On 24-02-2023 02:43, Matt Roper wrote: On Thu, Feb 23, 2023 at 03:20:28PM -0500, Rodrigo Vivi wrote: On Fri, Feb 24, 2023 at 12:11:40AM +0530, Badal Nilawar wrote: Apply Wa_14017073508 for MTL SoC die A step instead of graphics step. To get the SoC die stepping there is no direct inte

Re: [PATCH] drm/shmem-helper: Fix compile error

2023-02-28 Thread Dmitry Osipenko
Hi, On 2/28/23 15:50, Andi Shyti wrote: > Commit 67b7836d4458 ("drm/shmem-helper: Switch to reservation > lock") removes the drm_gem_shmem_get_pages_locked() and > drm_gem_shmem_put_pages_locked(). > > But then commit edaa0db9 ("drm/shmem-helper: Fix locking for > drm_gem_shmem_get_pages_sgt(

  1   2   >