[Bug 216224] AMDGPU fails to reset RX 480 after Ring GFX timeout

2022-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216224 --- Comment #3 from happysmas...@protonmail.com --- Created attachment 301377 --> https://bugzilla.kernel.org/attachment.cgi?id=301377&action=edit GPU crash 2022-05-24 Was most likely from lolMiner and on kernel 5.17.4, as I upgraded to 5.18.0

[Bug 216224] AMDGPU fails to reset RX 480 after Ring GFX timeout

2022-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216224 --- Comment #2 from happysmas...@protonmail.com --- Created attachment 301376 --> https://bugzilla.kernel.org/attachment.cgi?id=301376&action=edit SteamVR-induced crash 2022-05-26 -- You may reply to this email to add a comment. You are recei

[Bug 216224] AMDGPU fails to reset RX 480 after Ring GFX timeout

2022-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216224 --- Comment #1 from happysmas...@protonmail.com --- Created attachment 301375 --> https://bugzilla.kernel.org/attachment.cgi?id=301375&action=edit SteamVR-induced crash 2022-06-18 -- You may reply to this email to add a comment. You are recei

[Bug 216224] AMDGPU fails to reset RX 480 after Ring GFX timeout

2022-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216224 happysmas...@protonmail.com changed: What|Removed |Added Attachment #301374|SteamTV-induced crash |SteamVR-induced crash

[Bug 216224] New: AMDGPU fails to reset RX 480 after Ring GFX timeout

2022-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216224 Bug ID: 216224 Summary: AMDGPU fails to reset RX 480 after Ring GFX timeout Product: Drivers Version: 2.5 Kernel Version: 5.18.0 and earlier versions Hardware: Intel OS: Li

[PATCH v2 7/7] drm/msm/a6xx: Handle GMU prepare-slumber hfi failure

2022-07-08 Thread Akhil P Oommen
When prepare-slumber hfi fails, we should follow a6xx_gmu_force_off() sequence. Signed-off-by: Akhil P Oommen --- (no changes since v1) drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/driver

[PATCH v2 6/7] drm/msm/a6xx: Improve gpu recovery sequence

2022-07-08 Thread Akhil P Oommen
We can do a few more things to improve our chance at a successful gpu recovery, especially during a hangcheck timeout: 1. Halt CP and GMU core 2. Do RBBM GBIF HALT sequence 3. Do a soft reset of GPU core Signed-off-by: Akhil P Oommen --- (no changes since v1) drivers/gpu/drm/msm/adreno/a6xx.xm

[PATCH v2 5/7] arm64: dts: qcom: sc7280: Update gpu register list

2022-07-08 Thread Akhil P Oommen
Update gpu register array with gpucc memory region. Signed-off-by: Akhil P Oommen --- (no changes since v1) arch/arm64/boot/dts/qcom/sc7280.dtsi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dts

[PATCH v2 4/7] drm/msm: Ensure cx gdsc collapse during recovery

2022-07-08 Thread Akhil P Oommen
To improve our chance of a successful recovery, we should ensure that cx headswitch collapses. Cx headswitch might be kept enabled through a vote from another driver like iommu or even another hardware subsystem. So, poll the cx gdscr register to ensure that it collapses during recovery. Signed-of

[PATCH v2 3/7] drm/msm: Fix cx collapse issue during recovery

2022-07-08 Thread Akhil P Oommen
There are some hardware logic under CX domain. For a successful recovery, we should ensure cx headswitch collapses to ensure all the stale states are cleard out. This is especially true to for a6xx family where we can GMU co-processor. Currently, cx doesn't collapse due to a devlink between gpu an

[PATCH v2 2/7] drm/msm: Correct pm_runtime votes in recover worker

2022-07-08 Thread Akhil P Oommen
In the scenario where there is one a single submit which is hung, gpu is power collapsed when it is retired. Because of this, by the time we call reover(), gpu state would be already clear. Fix this by correctly managing the pm runtime votes. Signed-off-by: Akhil P Oommen --- (no changes since v

[PATCH v2 1/7] drm/msm: Remove unnecessary pm_runtime_get/put

2022-07-08 Thread Akhil P Oommen
We already enable gpu power from msm_gpu_submit(), so avoid a duplicate pm_runtime_get/put from msm_job_run(). Signed-off-by: Akhil P Oommen --- (no changes since v1) drivers/gpu/drm/msm/msm_ringbuffer.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_ringbuffer.

[PATCH v2 0/7] Improve GPU Recovery

2022-07-08 Thread Akhil P Oommen
Recently, I debugged a few device crashes which occured during recovery after a hangcheck timeout. It looks like there are a few things we can do to improve our chance at a successful gpu recovery. First one is to ensure that CX GDSC collapses which clears the internal states in gpu's CX domain.

[drm-tip:drm-tip 3/8] drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:512:28: error: passing argument 1 of 'mutex_lock' from incompatible pointer type

2022-07-08 Thread kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip head: 36d2ac0e15af4dfb942279e8097ab831661859e6 commit: cf07f850c0483b3314eb69fd8c810e461cef4035 [3/8] Merge remote-tracking branch 'drm/drm-next' into drm-tip config: ia64-allmodconfig (https://download.01.org/0day-ci/archive/20220709/20

Re: linux-next: Tree for Jul 8 (FRAMEBUFFER_CONSOLE without VT)

2022-07-08 Thread Randy Dunlap
On 7/8/22 03:15, Stephen Rothwell wrote: > Hi all, > > Changes since 20220707: > on uml/x86_64: WARNING: unmet direct dependencies detected for FRAMEBUFFER_CONSOLE Depends on [n]: VT [=n] && FB [=y] && !UML [=y] Selected by [y]: - DRM_FBDEV_EMULATION [=y] && HAS_IOMEM [=y] && DRM_KMS_HE

[drm-tip:drm-tip 3/8] include/linux/container_of.h:19:54: error: invalid use of undefined type 'struct drm_buddy_block'

2022-07-08 Thread kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip head: 36d2ac0e15af4dfb942279e8097ab831661859e6 commit: cf07f850c0483b3314eb69fd8c810e461cef4035 [3/8] Merge remote-tracking branch 'drm/drm-next' into drm-tip config: microblaze-randconfig-r011-20220707 (https://download.01.org/0day-ci/a

[PATCH v2 3/4] drm/lcdif: Clean up debug prints and comments

2022-07-08 Thread Marek Vasut
Update debug print to report bridge timings over connector ones. Drop missed comment commit from mxsfb. Reviewed-by: Liu Ying Reported-by: Liu Ying Fixes: 9db35bb349a0e ("drm: lcdif: Add support for i.MX8MP LCDIF variant") Signed-off-by: Marek Vasut Cc: Alexander Stein Cc: Laurent Pinchart Cc

[PATCH v2 1/4] drm/lcdif: Clean up headers

2022-07-08 Thread Marek Vasut
Drop unneeded headers, sort rest alphabetically, no functional change. Reviewed-by: Liu Ying Reported-by: Liu Ying Fixes: 9db35bb349a0e ("drm: lcdif: Add support for i.MX8MP LCDIF variant") Signed-off-by: Marek Vasut Cc: Alexander Stein Cc: Laurent Pinchart Cc: Liu Ying Cc: Lucas Stach Cc:

[PATCH v2 2/4] drm/lcdif: Consistently use plane timings

2022-07-08 Thread Marek Vasut
Drop the crtc_ prefix from mode, consistently use the plain one. Reviewed-by: Liu Ying Reported-by: Liu Ying Fixes: 9db35bb349a0e ("drm: lcdif: Add support for i.MX8MP LCDIF variant") Signed-off-by: Marek Vasut Cc: Alexander Stein Cc: Laurent Pinchart Cc: Liu Ying Cc: Lucas Stach Cc: Marek

[PATCH v2 4/4] drm/lcdif: switch to devm_drm_of_get_bridge

2022-07-08 Thread Marek Vasut
The function "drm_of_find_panel_or_bridge" has been deprecated in favor of "devm_drm_of_get_bridge". Switch to the new function and reduce boilerplate. Reviewed-by: Liu Ying Reported-by: Liu Ying Fixes: 9db35bb349a0e ("drm: lcdif: Add support for i.MX8MP LCDIF variant") Signed-off-by: Marek Vas

Re: [RFC] drm/i915/huc: better define HuC status getparam possible return values.

2022-07-08 Thread Ye, Tony
On 7/8/2022 4:48 PM, Daniele Ceraolo Spurio wrote: The current HuC status getparam return values are a bit confusing in regards to what happens in some scenarios. In particular, most of the error cases cause the ioctl to return an error, but a couple of them, INIT_FAIL and LOAD_FAIL, are not ex

[RFC] drm/i915/huc: better define HuC status getparam possible return values.

2022-07-08 Thread Daniele Ceraolo Spurio
The current HuC status getparam return values are a bit confusing in regards to what happens in some scenarios. In particular, most of the error cases cause the ioctl to return an error, but a couple of them, INIT_FAIL and LOAD_FAIL, are not explicitly handled and neither is their expected return v

[PATCH v3 09/10] vfio/ccw: Add kmap_local_page() for memcpy

2022-07-08 Thread Nicolin Chen
A PFN is not secure enough to promise that the memory is not IO. And direct access via memcpy() that only handles CPU memory will crash on S390 if the PFN is an IO PFN, as we have to use the memcpy_to/fromio() that uses the special S390 IO access instructions. On the other hand, a "struct page *" i

[PATCH v3 08/10] vfio: Rename user_iova of vfio_dma_rw()

2022-07-08 Thread Nicolin Chen
Following the updated vfio_pin/unpin_pages(), use the simpler "iova". Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Tested-by: Terrence Xu Tested-by: Eric Farman Signed-off-by: Nicolin Chen --- drivers/vfio/vfio.c | 6 +++--- include/linux/vfio.h | 2 +

[PATCH v3 06/10] vfio/ap: Change saved_pfn to saved_iova

2022-07-08 Thread Nicolin Chen
The vfio_ap_ops code maintains both nib address and its PFN, which is redundant, merely because vfio_pin/unpin_pages API wanted pfn. Since vfio_pin/unpin_pages() now accept "iova", change "saved_pfn" to "saved_iova" and remove pfn in the vfio_ap_validate_nib(). Reviewed-by: Jason Gunthorpe Tested

[PATCH v3 01/10] vfio: Make vfio_unpin_pages() return void

2022-07-08 Thread Nicolin Chen
There's only one caller that checks its return value with a WARN_ON_ONCE, while all other callers don't check the return value at all. Above that, an undo function should not fail. So, simplify the API to return void by embedding similar WARN_ONs. Also for users to pinpoint which condition fails,

[PATCH v3 07/10] vfio/ccw: Change pa_pfn list to pa_iova list

2022-07-08 Thread Nicolin Chen
The vfio_ccw_cp code maintains both iova and its PFN list because the vfio_pin/unpin_pages API wanted pfn list. Since vfio_pin/unpin_pages() now accept "iova", change to maintain only pa_iova list and rename all "pfn_array" strings to "page_array", so as to simplify the code. Reviewed-by: Jason Gu

[PATCH v3 05/10] vfio: Pass in starting IOVA to vfio_pin/unpin_pages API

2022-07-08 Thread Nicolin Chen
The vfio_pin/unpin_pages() so far accepted arrays of PFNs of user IOVA. Among all three callers, there was only one caller possibly passing in a non-contiguous PFN list, which is now ensured to have contiguous PFN inputs too. Pass in the starting address with "iova" alone to simplify things, so ca

[PATCH v3 04/10] vfio/ccw: Only pass in contiguous pages

2022-07-08 Thread Nicolin Chen
This driver is the only caller of vfio_pin/unpin_pages that might pass in a non-contiguous PFN list, but in many cases it has a contiguous PFN list to process. So letting VFIO API handle a non-contiguous PFN list is actually counterproductive. Add a pair of simple loops to pass in contiguous PFNs

[PATCH v3 03/10] vfio/ap: Pass in physical address of ind to ap_aqic()

2022-07-08 Thread Nicolin Chen
The ap_aqic() is called by vfio_ap_irq_enable() where it passes in a virt value that's casted from a physical address "h_nib". Inside the ap_aqic(), it does virt_to_phys() again. Since ap_aqic() needs a physical address, let's just pass in a pa of ind directly. So change the "ind" to "pa_ind". Re

[PATCH v3 02/10] drm/i915/gvt: Replace roundup with DIV_ROUND_UP

2022-07-08 Thread Nicolin Chen
It's a bit redundant for the maths here using roundup. Suggested-by: Jason Gunthorpe Tested-by: Terrence Xu Signed-off-by: Nicolin Chen --- drivers/gpu/drm/i915/gvt/kvmgt.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu

[PATCH v3 00/10] Update vfio_pin/unpin_pages API

2022-07-08 Thread Nicolin Chen
This is a preparatory series for IOMMUFD v2 patches. It prepares for replacing vfio_iommu_type1 implementations of vfio_pin/unpin_pages() with IOMMUFD version. There's a gap between these two versions: the vfio_iommu_type1 version inputs a non-contiguous PFN list and outputs another PFN list for t

[PATCH] drm/i915/guc: skip scrub_ctbs selftest if reset is disabled

2022-07-08 Thread Daniele Ceraolo Spurio
The test needs GT reset to trigger the scrubbing logic, so we can only run it when reset is enabled. Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/selftest_guc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i9

Re: [PATCH 1/9] dt-bindings: msm/dp: drop extra p1 region

2022-07-08 Thread Rob Herring
On Fri, 08 Jul 2022 00:31:56 +0300, Dmitry Baryshkov wrote: > The p1 region was probably added by mistake, none of the DTS files > provides one (and the driver source code also doesn't use one). Drop it > now. > > Fixes: 687825c402f1 ("dt-bindings: msm/dp: Change reg definition") > Signed-off-by:

Re: [PATCH v8 02/15] mm: move page zone helpers into new header-specific file

2022-07-08 Thread Felix Kuehling
On 2022-07-08 07:28, David Hildenbrand wrote: On 07.07.22 21:03, Alex Sierra wrote: [WHY] Have a cleaner way to expose all page zone helpers in one header What exactly is a "page zone"? Do you mean a buddy zone as in include/linux/mmzone.h ? Zone as in ZONE_DEVICE. Maybe we could extend mmzone

Re: [PATCH] drm/msm/dsi: Set panel orientation when directly connected

2022-07-08 Thread Abhinav Kumar
On 7/8/2022 1:58 PM, Dmitry Baryshkov wrote: On Fri, 8 Jul 2022 at 22:42, Abhinav Kumar wrote: On 7/8/2022 9:00 AM, Abhinav Kumar wrote: On 7/8/2022 8:25 AM, Doug Anderson wrote: Hi, On Wed, Jul 6, 2022 at 12:14 PM Stephen Boyd wrote: Set the panel orientation in drm when the pane

Re: [PATCH] drm/msm/dsi: Set panel orientation when directly connected

2022-07-08 Thread Dmitry Baryshkov
On Fri, 8 Jul 2022 at 22:42, Abhinav Kumar wrote: > > > > On 7/8/2022 9:00 AM, Abhinav Kumar wrote: > > > > > > On 7/8/2022 8:25 AM, Doug Anderson wrote: > >> Hi, > >> > >> On Wed, Jul 6, 2022 at 12:14 PM Stephen Boyd wrote: > >>> > >>> Set the panel orientation in drm when the panel is directly

[PATCH 6/6] drm/ingenic: Use the new PM macros

2022-07-08 Thread Paul Cercueil
- Use DEFINE_SIMPLE_DEV_PM_OPS() instead of the SIMPLE_DEV_PM_OPS() macro. This makes it possible to remove the __maybe_unused flags on the callback functions. - Since we only have callbacks for suspend/resume, we can conditionally compile the dev_pm_ops structure for when CONFIG_PM_SLEEP is

[PATCH 5/6] drm/ingenic: Make IPU driver its own module

2022-07-08 Thread Paul Cercueil
Instead of building the IPU driver code into the ingenic-drm driver, create a ingenic-ipu driver. Signed-off-by: Paul Cercueil --- drivers/gpu/drm/ingenic/Kconfig | 2 +- drivers/gpu/drm/ingenic/Makefile | 2 +- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 33 +---

[PATCH 4/6] drm/ingenic: Don't request full modeset if property is not modified

2022-07-08 Thread Paul Cercueil
Avoid requesting a full modeset if the sharpness property is not modified, because then we don't actually need it. Signed-off-by: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-ipu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-ipu.c

[PATCH 3/6] drm/ingenic: Add support for the JZ4760(B)

2022-07-08 Thread Paul Cercueil
Add support for the JZ4760 and JZ4760B SoCs to the ingenic-drm display driver. Signed-off-by: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 28 +++ 1 file changed, 28 insertions(+) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/inge

[PATCH 2/6] drm/ingenic: Fix MODULE_LICENSE() string

2022-07-08 Thread Paul Cercueil
The previous "GPL v2" string is deprecated. For more info, see commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity") Signed-off-by: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

[PATCH 1/6] dt-bindings/display: ingenic: Add compatible string for the JZ4760(B)

2022-07-08 Thread Paul Cercueil
Add compatible strings for the LCD controllers found in the JZ4760 and JZ4760B SoCs from Ingenic. Signed-off-by: Paul Cercueil Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: devicet...@vger.kernel.org --- Documentation/devicetree/bindings/display/ingenic,lcd.yaml | 2 ++ 1 file changed, 2 inserti

[PATCH 0/6] drm/ingenic: JZ4760(B) support and random changes

2022-07-08 Thread Paul Cercueil
Hi, A small set of changes to the ingenic-drm driver. The most notable thing is that ingenic-ipu is now its own platform driver. Cheers, -Paul Paul Cercueil (6): dt-bindings/display: ingenic: Add compatible string for the JZ4760(B) drm/ingenic: Fix MODULE_LICENSE() string drm/ingenic: Add

[PATCH v5 9/9] drm: selftest: convert drm_mm selftest to KUnit

2022-07-08 Thread Maíra Canal
From: Arthur Grillo Considering the current adoption of the KUnit framework, convert the DRM mm selftest to the KUnit API. Signed-off-by: Arthur Grillo Tested-by: David Gow Acked-by: Daniel Latypov Reviewed-by: Javier Martinez Canillas Signed-off-by: Maíra Canal --- Documentation/gpu/todo.

[PATCH v5 8/9] drm: selftest: convert drm_buddy selftest to KUnit

2022-07-08 Thread Maíra Canal
Considering the current adoption of the KUnit framework, convert the DRM buddy selftest to the KUnit API. Tested-by: David Gow Acked-by: Daniel Latypov Reviewed-by: Javier Martinez Canillas Signed-off-by: Maíra Canal --- drivers/gpu/drm/selftests/Makefile| 2 +- .../gpu/drm/self

[PATCH v5 6/9] drm: selftest: convert drm_dp_mst_helper selftest to KUnit

2022-07-08 Thread Maíra Canal
Considering the current adoption of the KUnit framework, convert the DRM DP MST helper selftest to the KUnit API. Co-developed-by: Rubens Gomes Neto Signed-off-by: Rubens Gomes Neto Tested-by: David Gow Acked-by: Daniel Latypov Reviewed-by: Javier Martinez Canillas Signed-off-by: Maíra Canal

[PATCH v5 5/9] drm: selftest: convert drm_plane_helper selftest to KUnit

2022-07-08 Thread Maíra Canal
Considering the current adoption of the KUnit framework, convert the DRM plane helper selftest to the KUnit API. Co-developed-by: Djakson C. G. Filho Signed-off-by: Djakson C. G. Filho Co-developed-by: Anderson Fraga Signed-off-by: Anderson Fraga Tested-by: David Gow Acked-by: Daniel Latypov

[PATCH v5 4/9] drm: selftest: convert drm_format selftest to KUnit

2022-07-08 Thread Maíra Canal
Considering the current adoption of the KUnit framework, convert the DRM format selftest to the KUnit API. Tested-by: David Gow Acked-by: Daniel Latypov Reviewed-by: Javier Martinez Canillas Signed-off-by: Maíra Canal --- drivers/gpu/drm/selftests/Makefile| 3 +- .../gpu/drm/sel

Re: [RFT][PATCH v2 0/9] Update vfio_pin/unpin_pages API

2022-07-08 Thread Nicolin Chen
On Fri, Jul 08, 2022 at 04:30:32PM -0400, Eric Farman wrote: > External email: Use caution opening links or attachments > > > On Tue, 2022-07-05 at 23:27 -0700, Nicolin Chen wrote: > > This is a preparatory series for IOMMUFD v2 patches. It prepares for > > replacing vfio_iommu_type1 implementati

[PATCH v5 3/9] drm: selftest: convert drm_rect selftest to KUnit

2022-07-08 Thread Maíra Canal
Considering the current adoption of the KUnit framework, convert the DRM rect selftest to the KUnit API. Co-developed-by: Carlos Veras Signed-off-by: Carlos Veras Co-developed-by: Matheus Vieira Signed-off-by: Matheus Vieira Tested-by: David Gow Acked-by: Daniel Latypov Reviewed-by: Javier M

[PATCH v5 2/9] drm: selftest: convert drm_cmdline_parser selftest to KUnit

2022-07-08 Thread Maíra Canal
Considering the current adoption of the KUnit framework, convert the DRM cmdline parser selftest to the KUnit API. Co-developed-by: Arthur Grillo Signed-off-by: Arthur Grillo Tested-by: David Gow Acked-by: Daniel Latypov Reviewed-by: Javier Martinez Canillas Signed-off-by: Maíra Canal --- d

[PATCH v5 1/9] drm: selftest: convert drm_damage_helper selftest to KUnit

2022-07-08 Thread Maíra Canal
Considering the current adoption of the KUnit framework, convert the DRM damage helper selftest to the KUnit API. Co-developed-by: Arthur Grillo Signed-off-by: Arthur Grillo Tested-by: David Gow Acked-by: Daniel Latypov Reviewed-by: Javier Martinez Canillas Signed-off-by: Maíra Canal --- dr

[PATCH v5 0/9] drm: selftest: Convert to KUnit

2022-07-08 Thread Maíra Canal
Hi everyone, Here is the v5 of the conversion of selftests to KUnit. Since the v4, the only fix was checking the checkpatch warnings and checks (Thank you Javier). Thanks for your attention and any feedback is welcomed! Best Regards, - Maíra Canal v1 -> v2: https://lore.kernel.org/dri-devel/20

Re: [RFT][PATCH v2 0/9] Update vfio_pin/unpin_pages API

2022-07-08 Thread Eric Farman
On Tue, 2022-07-05 at 23:27 -0700, Nicolin Chen wrote: > This is a preparatory series for IOMMUFD v2 patches. It prepares for > replacing vfio_iommu_type1 implementations of vfio_pin/unpin_pages() > with IOMMUFD version. > > There's a gap between these two versions: the vfio_iommu_type1 > version

Re: [RFT][PATCH v2 9/9] vfio: Replace phys_pfn with pages for vfio_pin_pages()

2022-07-08 Thread Eric Farman
On Tue, 2022-07-05 at 23:27 -0700, Nicolin Chen wrote: > Most of the callers of vfio_pin_pages() want "struct page *" and the > low-level mm code to pin pages returns a list of "struct page *" too. > So there's no gain in converting "struct page *" to PFN in between. > > Replace the output paramet

Re: [RFT][PATCH v2 8/9] vfio/ccw: Add kmap_local_page() for memcpy

2022-07-08 Thread Eric Farman
On Tue, 2022-07-05 at 23:27 -0700, Nicolin Chen wrote: > A PFN is not secure enough to promise that the memory is not IO. And > direct access via memcpy() that only handles CPU memory will crash on > S390 if the PFN is an IO PFN, as we have to use the > memcpy_to/fromio() > that uses the special S3

Re: [RFT][PATCH v2 4/9] vfio: Pass in starting IOVA to vfio_pin/unpin_pages API

2022-07-08 Thread Eric Farman
On Tue, 2022-07-05 at 23:27 -0700, Nicolin Chen wrote: > The vfio_pin/unpin_pages() so far accepted arrays of PFNs of user > IOVA. > Among all three callers, there was only one caller possibly passing > in > a non-contiguous PFN list, which is now ensured to have contiguous > PFN > inputs too. > >

Re: [RFT][PATCH v2 6/9] vfio/ccw: Change pa_pfn list to pa_iova list

2022-07-08 Thread Eric Farman
On Tue, 2022-07-05 at 23:27 -0700, Nicolin Chen wrote: > The vfio_ccw_cp code maintains both iova and its PFN list because the > vfio_pin/unpin_pages API wanted pfn list. Since > vfio_pin/unpin_pages() > now accept "iova", change to maintain only pa_iova list and rename > all > "pfn_array" strings

Re: [RFT][PATCH v2 3/9] vfio/ccw: Only pass in contiguous pages

2022-07-08 Thread Eric Farman
On Wed, 2022-07-06 at 14:05 -0300, Jason Gunthorpe wrote: > On Tue, Jul 05, 2022 at 11:27:53PM -0700, Nicolin Chen wrote: > > This driver is the only caller of vfio_pin/unpin_pages that might > > pass > > in a non-contiguous PFN list, but in many cases it has a contiguous > > PFN > > list to proces

Re: [RFT][PATCH v2 3/9] vfio/ccw: Only pass in contiguous pages

2022-07-08 Thread Eric Farman
On Tue, 2022-07-05 at 23:27 -0700, Nicolin Chen wrote: > This driver is the only caller of vfio_pin/unpin_pages that might > pass > in a non-contiguous PFN list, but in many cases it has a contiguous > PFN > list to process. So letting VFIO API handle a non-contiguous PFN list > is actually counter

Re: [RFT][PATCH v2 0/9] Update vfio_pin/unpin_pages API

2022-07-08 Thread Nicolin Chen
On Fri, Jul 08, 2022 at 07:24:30AM +, Xu, Terrence wrote: > External email: Use caution opening links or attachments > > > > -Original Message- > > From: intel-gvt-dev On Behalf > > Of > > On Thu, Jul 07, 2022 at 06:08:45AM +, Tian, Kevin wrote: > > > > > > Request for testing:

Re: [PATCH 2/5] drm/modes: Extract drm_mode_parse_cmdline_named_mode()

2022-07-08 Thread Geert Uytterhoeven
Hi Hans, On Fri, Jul 8, 2022 at 9:46 PM Hans de Goede wrote: > On 7/8/22 20:21, Geert Uytterhoeven wrote: > > Extract the code to check for a named mode parameter into its own > > function, to streamline the main parsing flow. > > > > Signed-off-by: Geert Uytterhoeven > > --- a/drivers/gpu/drm/

Re: [PATCH 1/5] drm/modes: parse_cmdline: Handle empty mode name part

2022-07-08 Thread Geert Uytterhoeven
Hi Hans, On Fri, Jul 8, 2022 at 10:06 PM Geert Uytterhoeven wrote: > On Fri, Jul 8, 2022 at 9:28 PM Hans de Goede wrote: > > On 7/8/22 20:21, Geert Uytterhoeven wrote: > > > If no mode name part was specified, mode_end is zero, and the "ret == > > > mode_end" check does the wrong thing. > > > >

Re: [PATCH 1/5] drm/modes: parse_cmdline: Handle empty mode name part

2022-07-08 Thread Geert Uytterhoeven
Hi Hans. On Fri, Jul 8, 2022 at 9:28 PM Hans de Goede wrote: > On 7/8/22 20:21, Geert Uytterhoeven wrote: > > If no mode name part was specified, mode_end is zero, and the "ret == > > mode_end" check does the wrong thing. > > > > Fix this by checking for a non-zero return value instead. > > Which

Re: [PATCH 1/9] dt-bindings: msm/dp: drop extra p1 region

2022-07-08 Thread Abhinav Kumar
On 7/8/2022 12:51 PM, Stephen Boyd wrote: Quoting Abhinav Kumar (2022-07-08 12:38:09) + kuogee On 7/8/2022 12:27 PM, Stephen Boyd wrote: Yes I see the same address for P1 on sc7280. Maybe it's a typo? Abhinav, can you confirm? P1 block does exist on sc7280 and yes its address is same as

Re: [PATCH 1/9] dt-bindings: msm/dp: drop extra p1 region

2022-07-08 Thread Stephen Boyd
Quoting Abhinav Kumar (2022-07-08 12:38:09) > + kuogee > > On 7/8/2022 12:27 PM, Stephen Boyd wrote: > > > > Yes I see the same address for P1 on sc7280. Maybe it's a typo? Abhinav, > > can you confirm? > > P1 block does exist on sc7280 and yes its address is same as the address > mentioned in sc71

Re: [PATCH 1/9] dt-bindings: msm/dp: drop extra p1 region

2022-07-08 Thread Kuogee Hsieh
On 7/8/2022 12:38 PM, Abhinav Kumar wrote: + kuogee On 7/8/2022 12:27 PM, Stephen Boyd wrote: Quoting Dmitry Baryshkov (2022-07-07 20:46:43) On 08/07/2022 04:28, Stephen Boyd wrote: Quoting Dmitry Baryshkov (2022-07-07 14:31:56) The p1 region was probably added by mistake, none of the DTS

Re: [PATCH 2/5] drm/modes: Extract drm_mode_parse_cmdline_named_mode()

2022-07-08 Thread Hans de Goede
Hi, On 7/8/22 20:21, Geert Uytterhoeven wrote: > Extract the code to check for a named mode parameter into its own > function, to streamline the main parsing flow. > > Signed-off-by: Geert Uytterhoeven > --- > drivers/gpu/drm/drm_modes.c | 41 +++-- > 1 file chan

Re: [PATCH] drm/msm/dsi: Set panel orientation when directly connected

2022-07-08 Thread Abhinav Kumar
On 7/8/2022 9:00 AM, Abhinav Kumar wrote: On 7/8/2022 8:25 AM, Doug Anderson wrote: Hi, On Wed, Jul 6, 2022 at 12:14 PM Stephen Boyd wrote: Set the panel orientation in drm when the panel is directly connected, i.e. we're not using an external bridge. The external bridge case is already

Re: [PATCH 1/9] dt-bindings: msm/dp: drop extra p1 region

2022-07-08 Thread Abhinav Kumar
+ kuogee On 7/8/2022 12:27 PM, Stephen Boyd wrote: Quoting Dmitry Baryshkov (2022-07-07 20:46:43) On 08/07/2022 04:28, Stephen Boyd wrote: Quoting Dmitry Baryshkov (2022-07-07 14:31:56) The p1 region was probably added by mistake, none of the DTS files provides one (and the driver source code

[PATCH] drm/vc4: Use the bitmap API to allocate bitmaps

2022-07-08 Thread Christophe JAILLET
Use bitmap_zalloc()/bitmap_free() instead of hand-writing them. It is less verbose and it improves the semantic. Signed-off-by: Christophe JAILLET --- drivers/gpu/drm/vc4/vc4_validate_shaders.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_

Re: [PATCH 0/5] drm/modes: Command line mode selection fixes and improvements

2022-07-08 Thread Hans de Goede
Hi Geert, On 7/8/22 20:21, Geert Uytterhoeven wrote: > Hi all, > > This patch series contains fixes and improvements for specifying video > modes on the kernel command line. > > This has been tested on ARAnyM using a work-in-progress Atari DRM driver > (more info and related patches can be

Re: [PATCH 1/5] drm/modes: parse_cmdline: Handle empty mode name part

2022-07-08 Thread Hans de Goede
Hi Geert, On 7/8/22 20:21, Geert Uytterhoeven wrote: > If no mode name part was specified, mode_end is zero, and the "ret == > mode_end" check does the wrong thing. > > Fix this by checking for a non-zero return value instead. Which is wrong to do, since now if you have e.g. a mode list with: "

Re: [PATCH 1/9] dt-bindings: msm/dp: drop extra p1 region

2022-07-08 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-07-07 20:46:43) > On 08/07/2022 04:28, Stephen Boyd wrote: > > Quoting Dmitry Baryshkov (2022-07-07 14:31:56) > >> The p1 region was probably added by mistake, none of the DTS files > >> provides one (and the driver source code also doesn't use one). Drop it > >> now.

Re: [PATCH 5/9] dt-bindings: msm/dp: account for clocks specific for qcom, sc7280-edp

2022-07-08 Thread Stephen Boyd
Quoting Dmitry Baryshkov (2022-07-07 20:59:02) > On 08/07/2022 04:32, Stephen Boyd wrote: > > Quoting Dmitry Baryshkov (2022-07-07 14:32:00) > >> diff --git > >> a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml > >> b/Documentation/devicetree/bindings/display/msm/dp-controller.y

Re: [GIT PULL] fbdev updates & fixes for v5.19-rc6

2022-07-08 Thread pr-tracker-bot
The pull request you sent on Fri, 8 Jul 2022 09:38:00 +0200: > http://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git > tags/for-5.19/fbdev-3 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/086ff84617185393a0bbf25830c4f36412a7d3f4 Thank you! -- Deet-d

[PATCH libdrm] modetest: Add support for named modes containing dashes

2022-07-08 Thread Geert Uytterhoeven
It is fairly common for named video modes to contain dashes (e.g. "tt-mid" on Atari, "dblntsc-ff" on Amiga). Currently such mode names are not recognized, as the dash is considered to be a separator between mode name and vertical refrsh. Fix this by skipping any dashes that are not followed immed

[PATCH libdrm v2 07/10] util: Add test pattern support for big-endian XRGB1555/RGB565

2022-07-08 Thread Geert Uytterhoeven
Add support for drawing the SMPTE and tiles test patterns in buffers using big-endian formats. For now this is limited to XRGB1555 and RGB565, which are the most common big-endian formats. Signed-off-by: Geert Uytterhoeven --- v2: - New. --- tests/util/pattern.c | 31 +

[PATCH libdrm v2 09/10] util: Add pwetty support for big-endian RGB565

2022-07-08 Thread Geert Uytterhoeven
Add support for rendering the crosshairs in a buffer using the big-endian RGB565 format. Signed-off-by: Geert Uytterhoeven --- v2: - New. --- tests/util/pattern.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/util/pattern.c b/tests/util/pattern.c index 627f402be1d02e1c..1222b47ea3f

[PATCH libdrm v2 02/10] util: Fix 32 bpp patterns on big-endian

2022-07-08 Thread Geert Uytterhoeven
DRM formats are defined to be little-endian, unless the DRM_FORMAT_BIG_ENDIAN flag is set. Hence writes of multi-byte pixel values need to take endianness into account. Introduce a swap32() helper to byteswap 32-bit values, and a cpu_to_le32() helper to convert 32-bit values from CPU-endian to li

[PATCH libdrm v2 08/10] util: Fix pwetty on big-endian

2022-07-08 Thread Geert Uytterhoeven
Cairo always uses native byte order for rendering. Hence if the byte order of the frame buffer differs from the byte order of the CPU, the frame buffer contents need to be byteswapped twice: once before rendering, to convert to native byte order, and a second time after rendering, to restore the f

[PATCH libdrm v2 10/10] modetest: Add SMPTE pattern support for C4 format

2022-07-08 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in buffers using a color-indexed frame buffer formats with two, four, or sixteen colors. Note that this still uses 256 as the CLUT size, as DRM_IOCTL_MODE_SETGAMMA enforces that the size matches against the (fixed) gamma size, while the CLUT size depends o

[PATCH libdrm v2 06/10] modetest: Add support for parsing big-endian formats

2022-07-08 Thread Geert Uytterhoeven
When specifying a frame buffer format like "RG16be" (big-endian RG16), modetest still uses the little-endian variant, as the format string is truncated to four characters. Fix this by increasing the format string size to 7 bytes (6 characters + NUL terminator). Signed-off-by: Geert Uytterhoeven

[PATCH libdrm v2 04/10] util: Add missing big-endian RGB16 frame buffer formats

2022-07-08 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven --- Any better suggestion than appending "be"? v2: - New. --- tests/util/format.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/util/format.c b/tests/util/format.c index a5464de6fc1ac70f..42a652c9a402a654 100644 --- a/tests/util/format.c +++ b/t

[PATCH libdrm v2 00/10] Big-endian fixes

2022-07-08 Thread Geert Uytterhoeven
Hi all, This patch series fixes some endianness issues in libdrm. It has been tested on ARAnyM using a work-in-progress Atari DRM driver. Changes compared to v1: - Consider arm, aarch64, microblaze, s390, and sh in endianness checks, - Add Acked-by, - Add swap32() intermediate h

[PATCH libdrm v2 02/10] util: Factor out and optimize C8 SMPTE color LUT

2022-07-08 Thread Geert Uytterhoeven
The color LUT for the SMPTE pattern in indexed mode contains 22 entries, although only 13 are non-unique. Reduce the size of the color LUT by dropping duplicate entries, so it can be reused for formats supporting e.g. 16 colors. Rename util_smpte_c8_gamma() to util_smpte_index_gamma() accordingly

[PATCH libdrm v2 01/10] intel: Improve checks for big-endian

2022-07-08 Thread Geert Uytterhoeven
- sparc64-linux-gnu-gcc does not define __BIG_ENDIAN__ or SPARC, but does define __sparc__, hence replace the check for SPARC by a check for __sparc__, - powerpc{,64,64}-linux-gnu-gcc does not define __ppc__ or __ppc64__, but does define __BIG_ENDIAN__. powerpc64le-linux-gnu-gcc

[PATCH libdrm v2 03/10] util: Fix 16 bpp patterns on big-endian

2022-07-08 Thread Geert Uytterhoeven
DRM formats are defined to be little-endian, unless the DRM_FORMAT_BIG_ENDIAN flag is set. Hence writes of multi-byte pixel values need to take endianness into account. Introduce a swap16() helper to byteswap 16-bit values, and a cpu_to_le16() helper to convert 16-bit values from CPU-endian to li

[PATCH libdrm v2 05/10] modetest: Fix printing of big-endian fourcc values

2022-07-08 Thread Geert Uytterhoeven
Big-endian fourcc values have the MSB set, as that is the DRM_FORMAT_BIG_ENDIAN flag. Hence printing the last byte unmodified leads to weird characters. Fix this by stripping the DRM_FORMAT_BIG_ENDIAN flag, and appending "be" for big-endian formats. Sample impact: Planes: id crtc

[PATCH libdrm v2 08/10] util: Add SMPTE pattern support for C2 format

2022-07-08 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in a buffer using the C2 indexed format. As only four colors are available, resolution is halved, and the pattern is drawn in a PenTile RG-GB matrix, using Floyd-Steinberg dithering. The magnitude of the green subpixels is reduced, as there are twice as ma

[PATCH libdrm v2 09/10] modetest: Add support for DRM_FORMAT_C[124]

2022-07-08 Thread Geert Uytterhoeven
Add support for creating buffers using the new color-indexed frame buffer formats with two, four, and sixteen colors. Signed-off-by: Geert Uytterhoeven --- v2: - Split off changes to tests/modetest/buffers.c. --- tests/modetest/buffers.c | 15 +++ 1 file changed, 15 insertions(+)

[PATCH libdrm v2 05/10] util: Store number of colors for indexed formats

2022-07-08 Thread Geert Uytterhoeven
Store the number of available colors for color-indexed frame buffer formats in the format_info[] array. This avoids the need of test code for having to use switch statements all the time to obtain the number of colors, or to check if a mode is color-indexed or not. Signed-off-by: Geert Uytterhoev

[PATCH libdrm v2 07/10] util: Add SMPTE pattern support for C1 format

2022-07-08 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in a buffer using the C1 indexed format. As only two colors are available, the pattern is drawn in black and white, using Floyd-Steinberg dithering. Signed-off-by: Geert Uytterhoeven --- v2: New. --- tests/util/pattern.c | 171

[PATCH libdrm v2 10/10] modetest: Add support for big-endian XRGB1555/RGB565

2022-07-08 Thread Geert Uytterhoeven
Add support for creating buffers using big-endian formats. For now this is limited to XRGB1555 and RGB565, which are the most common big-endian formats. Signed-off-by: Geert Uytterhoeven --- v2: - New. --- tests/modetest/buffers.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/

[PATCH libdrm v2 06/10] util: Add SMPTE pattern support for C4 format

2022-07-08 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in a buffer using the C4 indexed format. Signed-off-by: Geert Uytterhoeven --- v2: - Use new smpte_top[], - Split off changes to tests/util/pattern.c. --- tests/util/pattern.c | 42 ++ 1 file changed, 42 insert

[PATCH libdrm v2 04/10] util: Add support for DRM_FORMAT_C[124]

2022-07-08 Thread Geert Uytterhoeven
Add support for creating buffers using the new color-indexed frame buffer formats with two, four, and sixteen colors. Signed-off-by: Geert Uytterhoeven --- v2: - Split off changes to tests/util/format.c. --- tests/util/format.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/util/

[PATCH libdrm v2 01/10] util: Improve SMPTE color LUT accuracy

2022-07-08 Thread Geert Uytterhoeven
Fill in the LSB when converting color components from 8-bit to 16-bit. Signed-off-by: Geert Uytterhoeven --- v2: - New. --- tests/util/pattern.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/util/pattern.c b/tests/util/pattern.c index 178aee8341a38920..3753ebc

[PATCH/RFC libdrm v2 03/10] drm_fourcc: Add DRM_FORMAT_C[124]

2022-07-08 Thread Geert Uytterhoeven
Introduce fourcc codes for color-indexed frame buffer formats with two, four, and sixteen colors. The fill order (the order in which multiple pixels are packed in a byte) is the same order as used for indexed-color (2, 4, and 16 colors) images in the PNG specification, Version 1.2. This order is a

[PATCH libdrm v2 00/10] Add support for low-color frame buffer formats

2022-07-08 Thread Geert Uytterhoeven
Hi all, A long outstanding issue with the DRM subsystem has been the lack of support for low-color displays, as used typically on older desktop systems, and on small embedded displays. This patch series adds support for color-indexed frame buffer formats with 2, 4, and 16 colors. It has

  1   2   3   4   >