Re: [PATCH v3 1/2] drm/msm/dpu: Modify vblank_refcount if error in callback

2023-11-30 Thread Dmitry Baryshkov
On Fri, 1 Dec 2023 at 03:41, Paloma Arellano wrote: > > When the irq callback returns a value other than zero, > modify vblank_refcount by performing the inverse > operation of its corresponding if-else condition. I think it might be better to follow Bjorn's suggestion: once we have the lock, we

Re: [PATCH v3 0/2] Stabilize use of vblank_refcount

2023-11-30 Thread Dmitry Baryshkov
On Fri, 1 Dec 2023 at 03:41, Paloma Arellano wrote: > > There is currently a race condition occuring when accessing > vblank_refcount. Therefore, vblank irq timeouts may occur. > > Avoid any vblank irq timeouts by stablizing the use of vblank_refcount. > > Changes from prior versions: >v2: -

Re: [PATCH 0/2] drm/msm/dpu: INTF CRC configuration cleanups and fix

2023-11-30 Thread Dmitry Baryshkov
On Fri, 1 Dec 2023 at 03:31, Jessica Zhang wrote: > > This series drops the frame_count and enable parameters (as they're always > set to the same value). It also sets input_sel=0x1 for INTF. > > Signed-off-by: Jessica Zhang > --- > Jessica Zhang (2): > drm/msm/dpu: Drop enable and

Re: [PATCH 1/2] drm/msm/dpu: Drop enable and frame_count parameters from dpu_hw_setup_misr()

2023-11-30 Thread Dmitry Baryshkov
On Fri, 1 Dec 2023 at 03:31, Jessica Zhang wrote: > > Drop the enable and frame_count parameters from dpu_hw_setup_misr() as they > are always set to the same values. > > In addition, replace MISR_FRAME_COUNT_MASK with MISR_FRAME_COUNT as > frame_count is always set to the same value. > > Fixes:

Re: [PATCH 2/2] drm/msm/dpu: Set input_sel bit for INTF

2023-11-30 Thread Dmitry Baryshkov
On Fri, 1 Dec 2023 at 03:31, Jessica Zhang wrote: > > Set the input_sel bit for encoders as it was missed in the initial > implementation. > > Reported-by: Rob Clark > Fixes: 91143873a05d ("drm/msm/dpu: Add MISR register support for interface") > Closes:

Re: [PATCH 11/16] drm/msm/dpu: add an API to setup the CDM block for writeback

2023-11-30 Thread Dmitry Baryshkov
On Fri, 1 Dec 2023 at 02:41, Abhinav Kumar wrote: > > > > On 8/30/2023 5:11 PM, Dmitry Baryshkov wrote: > > On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar > > wrote: > >> > >> Add an API dpu_encoder_helper_phys_setup_cdm() which can be used by > >> the writeback encoder to setup the CDM block. >

Re: [PATCH 14/16] drm/msm/dpu: do not allow YUV formats if no CDM block is present

2023-11-30 Thread Dmitry Baryshkov
On Fri, 1 Dec 2023 at 02:50, Abhinav Kumar wrote: > > > > On 8/30/2023 5:24 PM, Dmitry Baryshkov wrote: > > On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar > > wrote: > >> > >> On chipsets where CDM block is not available OR where support has > >> not been added yet do not allow YUV formats for

Re: [PATCH 06/16] drm/msm/dpu: add dpu_hw_cdm abstraction for CDM block

2023-11-30 Thread Dmitry Baryshkov
On Fri, 1 Dec 2023 at 01:36, Abhinav Kumar wrote: > > > > On 8/30/2023 5:00 PM, Dmitry Baryshkov wrote: > > On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar > > wrote: > >> > >> CDM block comes with its own set of registers and operations > >> which can be done. In-line with other hardware

[git pull] drm fixes for 6.7-rc4

2023-11-30 Thread Dave Airlie
Hi Linus, Weekly fixes, mostly amdgpu fixes with a scattering of nouveau, i915, and a couple of reverts. Hopefully it will quieten down in coming weeks. Regards, Dave. drm-fixes-2023-12-01: drm fixes for 6.7-rc4 drm: - Revert unexport of prime helpers for fd/handle conversion dma_resv: - Do

Re: [PATCH v2 00/11] drm/tidss: Probe related fixes and cleanups

2023-11-30 Thread Aradhya Bhatia
Hi Tomi, Thank you for the patches! On 09/11/23 13:07, Tomi Valkeinen wrote: > While working on the TI BSP kernel, adding bootload splash screen > support, I noticed some issues with the driver and opportunities for > cleanups and improvements. > > Tomi > > Signed-off-by: Tomi Valkeinen >

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread Alistair Popple
"Zeng, Oak" writes: > See inline comments > >> -Original Message- >> From: dri-devel On Behalf Of >> zhuweixi >> Sent: Thursday, November 30, 2023 5:48 AM >> To: Christian König ; Zeng, Oak >> ; Christian König ; linux- >> m...@kvack.org; linux-ker...@vger.kernel.org;

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread Alistair Popple
zhuweixi writes: > Glad to know that there is a common demand for a new syscall like > hmadvise(). I expect it would also be useful for homogeneous NUMA > cases. Credits to cudaMemAdvise() API which brought this idea to > GMEM's design. It's not clear to me that this would need to be a new

RE: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread Zeng, Oak
See inline comments > -Original Message- > From: dri-devel On Behalf Of > zhuweixi > Sent: Thursday, November 30, 2023 5:48 AM > To: Christian König ; Zeng, Oak > ; Christian König ; linux- > m...@kvack.org; linux-ker...@vger.kernel.org; a...@linux-foundation.org; > Danilo Krummrich ;

[PATCH 5/5] drm/doc/rfc: Xe is using drm_exec, so mark as completed

2023-11-30 Thread Rodrigo Vivi
Nothing else to be done on this front from Xe perspective. Signed-off-by: Rodrigo Vivi --- Documentation/gpu/rfc/xe.rst | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/gpu/rfc/xe.rst b/Documentation/gpu/rfc/xe.rst index

[PATCH 4/5] drm/doc/rfc: Move userptr integration and vm_bind to the 'completed' section

2023-11-30 Thread Rodrigo Vivi
The must-have part of the documentation was already added to the existing /gpu/drm-vm-bind-async. The other extra discussion around GPUVM helpers are currently active in the community. None of those discussion should block Xe since documentation, specially around locking was completed in a

[PATCH 2/5] drm/doc/rfc: Mark drm_scheduler as completed

2023-11-30 Thread Rodrigo Vivi
Current drm-xe-next doesn't have any drm/scheduler patch that is not already accepted in drm-misc-next. This completed this goal with the consensus of how the drm/scheduler fits to the fw scheduling and the relationship between drm_gpu_scheduler and drm_sched_entity. Signed-off-by: Rodrigo Vivi

[PATCH 0/5] Update xe.rst RFC doc

2023-11-30 Thread Rodrigo Vivi
Let's move more items from the 'WIP' section to the 'Completed' one. When Xe was an initial experiment we had written down our goals and promises in this RFC with the goal to work with and contribute back to key common DRM items such as drm_scheduler, gpuvm, drm_exec, and establish documentations

[PATCH 3/5] drm/doc/rfc: Move Xe 'ASYNC VM_BIND' to the 'completed' section

2023-11-30 Thread Rodrigo Vivi
As already indicated in this block, the consensus was already reached out and documented as: The ASYNC VM_BIND document However this was item was not moved to the completed section. Let's move and clean up the WIP block. Signed-off-by: Rodrigo Vivi --- Documentation/gpu/rfc/xe.rst | 24

[PATCH 1/5] drm/doc/rfc: Mark long running workload as complete.

2023-11-30 Thread Rodrigo Vivi
From: Matthew Brost No DRM scheduler changes required, drivers just return NULL in run_job vfunc. The rough consensus is that no helper or extra scaffolding is needed around long-running jobs and no further changes to drm-scheduler. At least for now. Other drivers that currently do

Re: [PATCH v3 2/2] drm/msm/dpu: Add mutex lock in control vblank irq

2023-11-30 Thread Bjorn Andersson
On Thu, Nov 30, 2023 at 05:40:55PM -0800, Paloma Arellano wrote: > Add a missing mutex lock to control vblank irq. Thus prevent race > conditions when registering/unregistering the irq callback. > I'm guessing that the mutex is needed because vblank_refcount, while being an atomic_t, doesn't

Re: [PATCH] drm/mediatek/dp: Add the HDCP feature for DisplayPort

2023-11-30 Thread 胡俊光

RE: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread zhuweixi
Thanks! I am planning to present GMEM in Linux MM Alignment Sessions so I can collect more input from the mm developers. @Christian @Oak I will also send you invitations once a presentation is scheduled. :) -Weixi -Original Message- From: David Hildenbrand Sent: Thursday, November

RE: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-11-30 Thread zhuweixi
From your argument on KVM I can see that the biggest miscommunication between us is that you believed that GMEM wanted to share the whole address space. No, it is not the case. GMEM is only providing coordination via certain mmap() calls. So you are raising a case supporting GMEM again --

Re: [1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl

2023-11-30 Thread Sui Jingfeng
Hi, On 2023/11/28 18:45, Thomas Zimmermann wrote: The udl driver is the only caller of drm_plane_helper_atomic_check(). Move the function into the driver. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_plane_helper.c | 32 --

Re: [PATCH] drm/mediatek/dp: Add the HDCP feature for DisplayPort

2023-11-30 Thread 胡俊光

Re: [PATCH] drm/mediatek/dp: Add the HDCP feature for DisplayPort

2023-11-30 Thread 胡俊光

[PATCH v3 2/2] drm/msm/dpu: Add mutex lock in control vblank irq

2023-11-30 Thread Paloma Arellano
Add a missing mutex lock to control vblank irq. Thus prevent race conditions when registering/unregistering the irq callback. v2: Slightly changed wording of commit message v3: Mistakenly did not change wording in last version. It is done now. Signed-off-by: Paloma Arellano ---

[PATCH v3 1/2] drm/msm/dpu: Modify vblank_refcount if error in callback

2023-11-30 Thread Paloma Arellano
When the irq callback returns a value other than zero, modify vblank_refcount by performing the inverse operation of its corresponding if-else condition. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 9 +++--

[PATCH v3 0/2] Stabilize use of vblank_refcount

2023-11-30 Thread Paloma Arellano
There is currently a race condition occuring when accessing vblank_refcount. Therefore, vblank irq timeouts may occur. Avoid any vblank irq timeouts by stablizing the use of vblank_refcount. Changes from prior versions: v2: - Slightly changed wording of patch #2 commit message v3: -

[PATCH 2/2] drm/msm/dpu: Set input_sel bit for INTF

2023-11-30 Thread Jessica Zhang
Set the input_sel bit for encoders as it was missed in the initial implementation. Reported-by: Rob Clark Fixes: 91143873a05d ("drm/msm/dpu: Add MISR register support for interface") Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/39 Signed-off-by: Jessica Zhang ---

[PATCH 1/2] drm/msm/dpu: Drop enable and frame_count parameters from dpu_hw_setup_misr()

2023-11-30 Thread Jessica Zhang
Drop the enable and frame_count parameters from dpu_hw_setup_misr() as they are always set to the same values. In addition, replace MISR_FRAME_COUNT_MASK with MISR_FRAME_COUNT as frame_count is always set to the same value. Fixes: 7b37523fb1d1 ("drm/msm/dpu: Move MISR methods to dpu_hw_util")

[PATCH 0/2] drm/msm/dpu: INTF CRC configuration cleanups and fix

2023-11-30 Thread Jessica Zhang
This series drops the frame_count and enable parameters (as they're always set to the same value). It also sets input_sel=0x1 for INTF. Signed-off-by: Jessica Zhang --- Jessica Zhang (2): drm/msm/dpu: Drop enable and frame_count parameters from dpu_hw_setup_misr() drm/msm/dpu: Set

[PATCH v2 2/2] drm/msm/dpu: Add mutex lock in control vblank irq

2023-11-30 Thread Paloma Arellano
To add a missing mutex lock to control vblank irq. To prevent race conditions when registering/unregistering the irq callback. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 6 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 6 ++

[PATCH v2 0/2] Stabilize use of vblank_refcount

2023-11-30 Thread Paloma Arellano
There is currently a race condition occuring when accessing vblank_refcount. Therefore, vblank irq timeouts may occur. Avoid any vblank irq timeouts by stablizing the use of vblank_refcount. Changes from prior versions: v2: - Slightly changed wording of patch #2 commit message Paloma

[PATCH v2 1/2] drm/msm/dpu: Modify vblank_refcount if error in callback

2023-11-30 Thread Paloma Arellano
When the irq callback returns a value other than zero, modify vblank_refcount by performing the inverse operation of its corresponding if-else condition. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 9 +++--

[PATCH 2/2] drm/msm/dpu: Add mutex lock in control vblank irq

2023-11-30 Thread Paloma Arellano
To add a missing mutex lock to control vblank irq. To prevent race conditions when registering/unregistering the irq callback. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 6 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 6 ++

[PATCH 1/2] drm/msm/dpu: Modify vblank_refcount if error in callback

2023-11-30 Thread Paloma Arellano
When the irq callback returns a value other than zero, modify vblank_refcount by performing the inverse operation of its corresponding if-else condition. Signed-off-by: Paloma Arellano --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 9 +++--

[PATCH 0/2] Stabilize use of vblank_refcount

2023-11-30 Thread Paloma Arellano
There is currently a race condition occuring when accessing vblank_refcount. Therefore, vblank irq timeouts may occur. Avoid any vblank irq timeouts by stablizing the use of vblank_refcount. Paloma Arellano (2): drm/msm/dpu: Modify vblank_refcount if error in callback drm/msm/dpu: Add mutex

Re: [PATCH] drm/doc: Define KMS atomic state set

2023-11-30 Thread Bagas Sanjaya
On Thu, Nov 30, 2023 at 05:07:40PM -0300, André Almeida wrote: > From: Pekka Paalanen > > Specify how the atomic state is maintained between userspace and > kernel, plus the special case for async flips. > > Signed-off-by: Pekka Paalanen > Signed-off-by: André Almeida > --- > > This is a

Re: [PATCH 14/16] drm/msm/dpu: do not allow YUV formats if no CDM block is present

2023-11-30 Thread Abhinav Kumar
On 8/30/2023 5:24 PM, Dmitry Baryshkov wrote: On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar wrote: On chipsets where CDM block is not available OR where support has not been added yet do not allow YUV formats for writeback block. Signed-off-by: Abhinav Kumar ---

Re: [PATCH] drm/msm/dpu: Add missing safe_lut_tbl in sc8180x catalog

2023-11-30 Thread Bjorn Andersson
; {.nentry = ARRAY_SIZE(sc7180_qos_linear), > .entries = sc7180_qos_linear > > --- > base-commit: 3cd3fe06ff81cfb3a969acb12a56796cff5af23d > change-id: 20231130-sc8180x-dpu-safe-lut-ffd0df221d67 > > Best regards, > -- > Bjorn Andersson >

Re: [PATCH 13/16] drm/msm/dpu: reserve cdm blocks for writeback in case of YUV output

2023-11-30 Thread Abhinav Kumar
On 8/30/2023 5:23 PM, Dmitry Baryshkov wrote: On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar wrote: Reserve CDM blocks for writeback if the format of the output fb is YUV. At the moment, the reservation is done only for writeback but can easily be extended by relaxing the checks once other

Re: [PATCH 11/16] drm/msm/dpu: add an API to setup the CDM block for writeback

2023-11-30 Thread Abhinav Kumar
On 8/30/2023 5:11 PM, Dmitry Baryshkov wrote: On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar wrote: Add an API dpu_encoder_helper_phys_setup_cdm() which can be used by the writeback encoder to setup the CDM block. Currently, this is defined and used within the writeback's physical encoder

[PATCH] drm/msm/dpu: Add missing safe_lut_tbl in sc8180x catalog

2023-11-30 Thread Bjorn Andersson
x, 0x0}, + .safe_lut_tbl = {0xfff0, 0xf000, 0x}, .qos_lut_tbl = { {.nentry = ARRAY_SIZE(sc7180_qos_linear), .entries = sc7180_qos_linear --- base-commit: 3cd3fe06ff81cfb3a969acb12a56796cff5af23d change-id: 20231130-sc8180x-dpu-safe-lut-ffd0df22

[PATCH] drm/msm/adreno: Fix A680 chip id

2023-11-30 Thread Bjorn Andersson
_CHIP_IDS(0x0608), + .chip_ids = ADRENO_CHIP_IDS(0x06080001), .family = ADRENO_6XX_GEN2, .revn = 680, .fw = { --- base-commit: 3cd3fe06ff81cfb3a969acb12a56796cff5af23d change-id: 20231130-adreno-a680-1-639717a53b56 Best regards, -- Bjorn Andersson

Re: [PATCH v7 2/2] drm/i915/guc: Close deregister-context race against CT-loss

2023-11-30 Thread Teres Alexis, Alan Previn
> As far as i can tell, its only if we started resetting / wedging right after > this > queued worker got started. alan: hope Daniele can proof read my tracing and confirm if got it right.

Re: [PATCH v7 2/2] drm/i915/guc: Close deregister-context race against CT-loss

2023-11-30 Thread Teres Alexis, Alan Previn
On Thu, 2023-11-30 at 16:18 -0500, Vivi, Rodrigo wrote: > On Wed, Nov 29, 2023 at 04:20:13PM -0800, Alan Previn wrote: alan:snip > > + > > if (unlikely(disabled)) { > > release_guc_id(guc, ce); > > __guc_context_destroy(ce); > > - return; > > +

Re: [PATCH 10/16] drm/msm/dpu: add support to disable CDM block during encoder cleanup

2023-11-30 Thread Abhinav Kumar
On 8/30/2023 5:14 PM, Dmitry Baryshkov wrote: On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar wrote: In preparation of setting up CDM block, add the logic to disable it properly during encoder cleanup. Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 8

Re: [PATCH 09/16] drm/msm/dpu: add CDM related logic to dpu_hw_ctl layer

2023-11-30 Thread Abhinav Kumar
On 8/30/2023 5:12 PM, Dmitry Baryshkov wrote: On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar wrote: CDM block will need its own logic to program the flush and active bits in the dpu_hw_ctl layer. Make necessary changes in dpu_hw_ctl to support CDM programming. Signed-off-by: Abhinav Kumar

Re: [PATCH 08/16] drm/msm/dpu: add support to allocate CDM from RM

2023-11-30 Thread Abhinav Kumar
On 8/30/2023 5:06 PM, Dmitry Baryshkov wrote: On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar wrote: Even though there is usually only one CDM block, it can be used by either HDMI, DisplayPort OR Writeback interfaces. Hence its allocation needs to be tracked properly by the resource manager

Re: [PATCH 07/16] drm/msm/dpu: add cdm blocks to RM

2023-11-30 Thread Abhinav Kumar
On 8/30/2023 4:48 PM, Dmitry Baryshkov wrote: On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar wrote: Add the RM APIs necessary to initialize and allocate CDM blocks by the rest of the DPU pipeline. ... to be used by the rest? Yes, thanks. Signed-off-by: Abhinav Kumar ---

Re: [PATCH 06/16] drm/msm/dpu: add dpu_hw_cdm abstraction for CDM block

2023-11-30 Thread Abhinav Kumar
On 8/30/2023 5:00 PM, Dmitry Baryshkov wrote: On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar wrote: CDM block comes with its own set of registers and operations which can be done. In-line with other hardware sub-blocks, this change adds the dpu_hw_cdm abstraction for the CDM block.

Re: Radeon regression in 6.6 kernel

2023-11-30 Thread Alex Deucher
On Wed, Nov 29, 2023 at 10:47 PM Luben Tuikov wrote: > > On 2023-11-29 22:36, Luben Tuikov wrote: > > On 2023-11-29 15:49, Alex Deucher wrote: > >> On Wed, Nov 29, 2023 at 3:10 PM Alex Deucher wrote: > >>> > >>> Actually I think I see the problem. I'll try and send out a patch > >>> later today

[PATCH v2] drm/display/dp: Add the remaining Square PHY patterns DPCD register definitions

2023-11-30 Thread Khaled Almahallawy
DP2.1 Specs added new DPCDs definitions for square pattern configs[1] These new definitions are used for UHBR Source Transmitter Equalizations tests[2]. Add the 3 new values for square pattern. v2: rebase [1]: DP2.1 Specs - 2.12.3.6.5 Square Pattern [2]: DP2.1 PHY CTS specs - 4.3 UHBR Source

Re: [PATCH v3] drm/msm/dpu: Capture dpu snapshot when frame_done_timer timeouts

2023-11-30 Thread Abhinav Kumar
On 11/30/2023 2:47 PM, Paloma Arellano wrote: Trigger a devcoredump to dump dpu registers and capture the drm atomic state when the frame_done_timer timeouts. v2: Optimize the format in which frame_done_timeout_cnt is incremented v3: Describe parameter frame_done_timeout_cnt in

[PATCH v3] drm/msm/dpu: Capture dpu snapshot when frame_done_timer timeouts

2023-11-30 Thread Paloma Arellano
Trigger a devcoredump to dump dpu registers and capture the drm atomic state when the frame_done_timer timeouts. v2: Optimize the format in which frame_done_timeout_cnt is incremented v3: Describe parameter frame_done_timeout_cnt in dpu_encoder_virt Reported-by: kernel test robot Closes:

Re: [PATCH v3 13/14] dt-bindings: iommu: rockchip: Add Rockchip RK3588

2023-11-30 Thread Heiko Stübner
Hi Andy, Am Donnerstag, 30. November 2023, 13:25:00 CET schrieb Andy Yan: > From: Andy Yan > > Add a Rockchip RK3588 compatible > > Signed-off-by: Andy Yan > --- > > (no changes since v1) > > Documentation/devicetree/bindings/iommu/rockchip,iommu.yaml | 1 + > 1 file changed, 1

Re: [PATCH 04/16] drm/msm/dpu: add cdm blocks to sc7280 dpu_hw_catalog

2023-11-30 Thread Abhinav Kumar
On 8/30/2023 3:57 PM, Dmitry Baryshkov wrote: On Thu, 31 Aug 2023 at 01:49, Abhinav Kumar wrote: Add CDM blocks to the sc7280 dpu_hw_catalog to support YUV format output from writeback block. Signed-off-by: Abhinav Kumar --- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 9

Re: [PATCH v2] drm/modes: replace deprecated strncpy with strscpy_pad

2023-11-30 Thread Kees Cook
On Mon, 16 Oct 2023 22:38:20 +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > We should NUL-pad as there are full struct copies happening in places: > |

[pull] amdgpu, amdkfd, drm drm-fixes-6.7

2023-11-30 Thread Alex Deucher
Hi Dave, Sima, Fixes for 6.7. Mostly fixes for new IPs. Also including a revert of the unexport of the currently unused prime helpers for fd/handle conversion since amdgpu will use them in 6.8 so I see no reason to remove them only to re-add them again in 6.8. The following changes since

Re: Radeon regression in 6.6 kernel

2023-11-30 Thread Alex Deucher
On Wed, Nov 29, 2023 at 10:36 PM Luben Tuikov wrote: > > On 2023-11-29 15:49, Alex Deucher wrote: > > On Wed, Nov 29, 2023 at 3:10 PM Alex Deucher wrote: > >> > >> Actually I think I see the problem. I'll try and send out a patch > >> later today to test. > > > > Does the attached patch fix it?

Re: [Freedreno] [PATCH] drm/msm/dpu: Correct UBWC settings for sc8280xp

2023-11-30 Thread Abhinav Kumar
On 11/30/2023 11:21 AM, Rob Clark wrote: From: Rob Clark The UBWC settings need to match between the display and GPU. When we updated the GPU settings, we forgot to make the corresponding update on the display side. Reported-by: Steev Klimaszewski Fixes: 07e6de738aa6 ("drm/msm/a690: Fix

Re: [PATCH] drm/msm/dpu: Correct UBWC settings for sc8280xp

2023-11-30 Thread Steev Klimaszewski
On Thu, Nov 30, 2023 at 1:21 PM Rob Clark wrote: > > From: Rob Clark > > The UBWC settings need to match between the display and GPU. When we > updated the GPU settings, we forgot to make the corresponding update on > the display side. > > Reported-by: Steev Klimaszewski > Fixes: 07e6de738aa6

Re: [PATCH v7 2/2] drm/i915/guc: Close deregister-context race against CT-loss

2023-11-30 Thread Rodrigo Vivi
On Wed, Nov 29, 2023 at 04:20:13PM -0800, Alan Previn wrote: > If we are at the end of suspend or very early in resume > its possible an async fence signal (via rcu_call) is triggered > to free_engines which could lead us to the execution of > the context destruction worker (after a prior worker

[PATCH 2/3] drm/msm/adreno: Add A305B support

2023-11-30 Thread Luca Weiss
Add support for the Adreno 305B GPU that is found in MSM8226(v2) SoC. Previously this was mistakenly claimed to be supported but using wrong a configuration. In MSM8226v1 there's also a A305B but with chipid 0x03000510 which should work with the same configuration but due to lack of hardware for

[PATCH 1/3] dt-bindings: display/msm: gpu: Allow multiple digits for patchid

2023-11-30 Thread Luca Weiss
Some GPUs like the Adreno A305B has a patchid higher than 9, in this case 18. Make sure the regexes can account for that. Signed-off-by: Luca Weiss --- Documentation/devicetree/bindings/display/msm/gpu.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 0/3] Add GPU support for MSM8226 (Adreno A305B)

2023-11-30 Thread Luca Weiss
| 5 +++ 5 files changed, 71 insertions(+), 10 deletions(-) --- base-commit: 32bbbdc6dbe6ca65a3e3e2ed2ca3c562793e7797 change-id: 20231130-msm8226-gpu-c2ff8473a9ff Best regards, -- Luca Weiss

[PATCH 3/3] ARM: dts: qcom: msm8226: Add GPU

2023-11-30 Thread Luca Weiss
The msm8226 SoC contains an Adreno 305B. Add a node to configure it. Signed-off-by: Luca Weiss --- arch/arm/boot/dts/qcom/qcom-msm8226.dtsi | 40 1 file changed, 40 insertions(+) diff --git a/arch/arm/boot/dts/qcom/qcom-msm8226.dtsi

[syzbot] Monthly dri report (Nov 2023)

2023-11-30 Thread syzbot
Hello dri maintainers/developers, This is a 31-day syzbot report for the dri subsystem. All related reports/information can be found at: https://syzkaller.appspot.com/upstream/s/dri During the period, 1 new issues were detected and 0 were fixed. In total, 15 issues are still open and 30 have

[PATCH] drm/doc: Define KMS atomic state set

2023-11-30 Thread André Almeida
From: Pekka Paalanen Specify how the atomic state is maintained between userspace and kernel, plus the special case for async flips. Signed-off-by: Pekka Paalanen Signed-off-by: André Almeida --- This is a standalone patch from the following serie, the other patches are already merged:

Re: [PULL] drm-intel-fixes

2023-11-30 Thread Ville Syrjälä
On Thu, Nov 30, 2023 at 04:58:48PM +0200, Jani Nikula wrote: > > Hi Dave & Sima - > > i915 fixes for v6.7-rc4. > > drm-intel-fixes-2023-11-30: > drm/i915 fixes for v6.7-rc4: > - Mark internal GSC engine with reserved uabi class > - Take VGA converters into account in eDP probe > - Fix

Re: [drm-misc:for-linux-next-fixes 1/2] drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c:1389: warning: Function parameter or member 'priv' not described in 'r535_gsp_msg_run_cpu_sequencer'

2023-11-30 Thread Timur Tabi
On Thu, 2023-11-30 at 22:58 +0800, kernel test robot wrote: > If you fix the issue in a separate patch/commit (i.e. not just a new > version of > the same patch/commit), kindly add following tags > > Reported-by: kernel test robot > > Closes:

[PATCH] drm/msm/dpu: Correct UBWC settings for sc8280xp

2023-11-30 Thread Rob Clark
From: Rob Clark The UBWC settings need to match between the display and GPU. When we updated the GPU settings, we forgot to make the corresponding update on the display side. Reported-by: Steev Klimaszewski Fixes: 07e6de738aa6 ("drm/msm/a690: Fix reg values for a690") Signed-off-by: Rob Clark

Re: [PATCH v2] drm/msm/dpu: Capture dpu snapshot when frame_done_timer timeouts

2023-11-30 Thread kernel test robot
Hi Paloma, kernel test robot noticed the following build warnings: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on linus/master v6.7-rc3 next-20231130] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest

[PATCH v5] drm/test: add a test suite for GEM objects backed by shmem

2023-11-30 Thread Marco Pagani
This patch introduces an initial KUnit test suite for GEM objects backed by shmem buffers. Suggested-by: Javier Martinez Canillas Signed-off-by: Marco Pagani v5: - using __drm_kunit_helper_alloc_drm_device() to avoid local struct v4: - Add missing MMU dependency for DRM_GEM_SHMEM_HELPER

Re: [PATCH] drm/radeon: check return value of radeon_ring_lock()

2023-11-30 Thread Alex Deucher
Applied. Thanks! On Tue, Aug 8, 2023 at 2:08 PM Nikita Zhandarovich wrote: > > In the unlikely event of radeon_ring_lock() failing, its errno return > value should be processed. This patch checks said return value and > prints a debug message in case of an error. > > Found by Linux Verification

Re: [PATCH] drm/radeon/r100: Fix integer overflow issues in r100_cs_track_check()

2023-11-30 Thread Alex Deucher
Applied. Thanks! On Wed, Nov 29, 2023 at 10:28 AM Nikita Zhandarovich wrote: > > It may be possible, albeit unlikely, to encounter integer overflow > during the multiplication of several unsigned int variables, the > result being assigned to a variable 'size' of wider type. > > Prevent this

Re: [PATCH] drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()

2023-11-30 Thread Alex Deucher
Applied. Thanks! On Wed, Nov 29, 2023 at 10:28 AM Nikita Zhandarovich wrote: > > While improbable, there may be a chance of hitting integer > overflow when the result of radeon_get_ib_value() gets shifted > left. > > Avoid it by casting one of the operands to larger data type (u64). > > Found

[PATCH v4 17/17] drm/v3d: Create a CPU job extension for the copy performance query job

2023-11-30 Thread Maíra Canal
A CPU job is a type of job that performs operations that requires CPU intervention. A copy performance query job is a job that copy the complete or partial result of a query to a buffer. In order to copy the result of a performance query to a buffer, we need to get the values from the performance

[PATCH v4 15/17] drm/v3d: Create a CPU job extension to copy timestamp query to a buffer

2023-11-30 Thread Maíra Canal
A CPU job is a type of job that performs operations that requires CPU intervention. A copy timestamp query job is a job that copy the complete or partial result of a query to a buffer. As V3D doesn't provide any mechanism to obtain a timestamp from the GPU, it is a job that needs CPU intervention.

[PATCH v4 12/17] drm/v3d: Create a CPU job extension for a indirect CSD job

2023-11-30 Thread Maíra Canal
A CPU job is a type of job that performs operations that requires CPU intervention. An indirect CSD job is a job that, when executed in the queue, will map the indirect buffer, read the dispatch parameters, and submit a regular dispatch. Therefore, it is a job that needs CPU intervention. So,

[PATCH v4 14/17] drm/v3d: Create a CPU job extension for the reset timestamp job

2023-11-30 Thread Maíra Canal
A CPU job is a type of job that performs operations that requires CPU intervention. A reset timestamp job is a job that resets the timestamp queries based on the value offset of the first query. As V3D doesn't provide any mechanism to obtain a timestamp from the GPU, it is a job that needs CPU

[PATCH v4 16/17] drm/v3d: Create a CPU job extension for the reset performance query job

2023-11-30 Thread Maíra Canal
A CPU job is a type of job that performs operations that requires CPU intervention. A reset performance query job is a job that resets the performance queries by resetting the values of the perfmons. Moreover, we also reset the syncobjs related to the availability of the query. So, create a user

[PATCH v4 13/17] drm/v3d: Create a CPU job extension for the timestamp query job

2023-11-30 Thread Maíra Canal
A CPU job is a type of job that performs operations that requires CPU intervention. A timestamp query job is a job that calculates the query timestamp and updates the query availability by signaling a syncobj. As V3D doesn't provide any mechanism to obtain a timestamp from the GPU, it is a job

[PATCH v4 07/17] drm/v3d: Add a CPU job submission

2023-11-30 Thread Maíra Canal
From: Melissa Wen Create a new type of job, a CPU job. A CPU job is a type of job that performs operations that requires CPU intervention. The overall idea is to use user extensions to enable different types of CPU job, allowing the CPU job to perform different operations according to the type

[PATCH v4 11/17] drm/v3d: Enable BO mapping

2023-11-30 Thread Maíra Canal
For the indirect CSD CPU job, we will need to access the internal contents of the BO with the dispatch parameters. Therefore, create methods to allow the mapping and unmapping of the BO. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga --- drivers/gpu/drm/v3d/v3d_bo.c | 18

[PATCH v4 10/17] drm/v3d: Detach the CSD job BO setup

2023-11-30 Thread Maíra Canal
From: Melissa Wen Detach CSD job setup from CSD submission ioctl to reuse it in CPU submission ioctl for indirect CSD job. Signed-off-by: Melissa Wen Co-developed-by: Maíra Canal Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga --- drivers/gpu/drm/v3d/v3d_submit.c | 68

[PATCH v4 08/17] drm/v3d: Use v3d_get_extensions() to parse CPU job data

2023-11-30 Thread Maíra Canal
Currently, v3d_get_extensions() only parses multisync data and assigns it to the `struct v3d_submit_ext`. But, to implement the CPU job with user extensions, we want v3d_get_extensions() to be able to parse CPU job data and assign it to the `struct v3d_cpu_job`. Therefore, allow the function

[PATCH v4 06/17] drm/v3d: Decouple job allocation from job initiation

2023-11-30 Thread Maíra Canal
We want to allow the IOCTLs to allocate the job without initiating it. This will be useful for the CPU job submission IOCTL, as the CPU job has the need to use information from the user extensions. Currently, the user extensions are parsed before the job allocation, making it impossible to fill

[PATCH v4 09/17] drm/v3d: Create tracepoints to track the CPU job

2023-11-30 Thread Maíra Canal
Create tracepoints to track the three major events of a CPU job lifetime: 1. Submission of a `v3d_submit_cpu` IOCTL 2. Beginning of the execution of a CPU job 3. Ending of the execution of a CPU job Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga ---

[PATCH v4 05/17] drm/v3d: Don't allow two multisync extensions in the same job

2023-11-30 Thread Maíra Canal
Currently, two multisync extensions can be added to the same job and only the last multisync extension will be used. To avoid this vulnerability, don't allow two multisync extensions in the same job. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga ---

[PATCH v4 04/17] drm/v3d: Simplify job refcount handling

2023-11-30 Thread Maíra Canal
From: Melissa Wen Instead of checking if the job is NULL every time we call the function, check it inside the function. Signed-off-by: Melissa Wen Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga --- drivers/gpu/drm/v3d/v3d_submit.c | 9 + 1 file changed, 5 insertions(+),

[PATCH v4 03/17] drm/v3d: Detach job submissions IOCTLs to a new specific file

2023-11-30 Thread Maíra Canal
From: Melissa Wen We will include a new job submission type, the CPU job submission. For readability and maintability, separate the job submission IOCTLs and related operations from v3d_gem.c. Minor fix in the CSD submission kernel doc: CSD (texture formatting) -> CSD (compute shader).

[PATCH v4 02/17] drm/v3d: Move wait BO ioctl to the v3d_bo file

2023-11-30 Thread Maíra Canal
From: Melissa Wen IOCTLs related to BO operations reside on the file v3d_bo.c. The wait BO ioctl is the only IOCTL regarding BOs that is placed in a different file. So, move it to the v3d_bo.c file. Signed-off-by: Melissa Wen Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga ---

[PATCH v4 00/17] drm/v3d: Introduce CPU jobs

2023-11-30 Thread Maíra Canal
This patchset implements the basic infrastructure for a new type of V3D job, a CPU job. A CPU job is a job that requires CPU intervention. It would be nice to perform this operations on the kernel space as we can attach multiple in/out syncobjs to it. Why we want a CPU job on the kernel?

[PATCH v4 01/17] drm/v3d: Remove unused function header

2023-11-30 Thread Maíra Canal
From: Melissa Wen v3d_mmu_get_offset header was added but the function was never defined. Just remove it. Signed-off-by: Melissa Wen Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga --- drivers/gpu/drm/v3d/v3d_drv.h | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [Intel-gfx] [PATCH] drm/i915/display: Fix phys_base to be relative not absolute

2023-11-30 Thread Paz Zcharya
On Tue, Nov 28, 2023 at 12:12:08PM +0100, Andrzej Hajda wrote: > On 28.11.2023 04:47, Paz Zcharya wrote: > > > > On Mon, Nov 27, 2023 at 8:20 PM Paz Zcharya wrote: > > > > > > On 21.11.2023 13:06, Andrzej Hajda wrote: > > > > > > > The simplest approach would be then do the same as in case of

[PATCH] drm/i915/display: Check GGTT to determine phys_base

2023-11-30 Thread Paz Zcharya
There was an assumption that for iGPU there should be a 1:1 mapping of GGTT to physical address pointing to actual framebuffer. This assumption is not valid anymore for MTL. Fix that by checking GGTT to determine the phys address. The following algorithm for phys_base should be valid for all

Re: [PATCH v2 1/2] drm: bridge: adv7511: fix reading edid segments

2023-11-30 Thread Frieder Schrempf
On 30.11.23 16:57, Frieder Schrempf wrote: > Hi Emil, > > On 27.10.23 14:22, Emil Abildgaard Svendsen wrote: >> [Sie erhalten nicht häufig E-Mails von e...@bang-olufsen.dk. Weitere >> Informationen, warum dies wichtig ist, finden Sie unter >> https://aka.ms/LearnAboutSenderIdentification ] >>

[PATCH v2 4/5] drm/imagination: pvr_gpuvm_free() now static

2023-11-30 Thread Donald Robson
The function below is used only within this source file, but is not static. drivers/gpu/drm/imagination/pvr_vm.c:542:6: error: no previous prototype for 'pvr_gpuvm_free' [-Werror=missing-prototypes] 542 | void pvr_gpuvm_free(struct drm_gpuvm *gpuvm) Make it static. Reported-by: Arnd Bergmann

  1   2   >