[PATCH v5 10/10] drm/bridge: it6505: add I2C functionality on AUX

2024-09-30 Thread Hermes Wu
From: Hermes Wu DisplayPort AUX protocol supports I2C transport which is capable of reading EDID or supports MCCS. In drm_dp_helper, drm_dp_i2c_xfer() packs I2C requests into a sequence of AUX requests. it6505_aux_i2c_operation() is implemented to match drm_dp_i2c_xfer() behavior. it6505_aux_i

[PATCH v5 09/10] drm/bridge: it6505: fix HDCP CTS KSV list wait timer

2024-09-30 Thread Hermes Wu
From: Hermes Wu HDCP must disabled encryption and restart authentication after waiting KSV for 5s. The original method uses a counter in a waitting loop that may wait much longer than it is supposed to. Use time_after() for KSV wait timeout. Signed-off-by: Hermes Wu --- drivers/gpu/drm/bridg

[PATCH v5 08/10] drm/bridge: it6505: fix HDCP CTS compare V matching

2024-09-30 Thread Hermes Wu
From: Hermes Wu When HDCP negotiation with a repeater device. Checking SHA V' matching must retry 3 times before restarting HDCP. Signed-off-by: Hermes Wu --- drivers/gpu/drm/bridge/ite-it6505.c | 32 + 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a

[PATCH v5 07/10] drm/bridge: it6505: fix HDCP CTS KSV list read with UNIGRAF DPR-100.

2024-09-30 Thread Hermes Wu
From: Hermes Wu When running the HDCP CTS test with UNIGRAF DPR-100. KSV list must be read from DP_AUX_HDCP_KSV_FIFO in an AUX request, and can not separate with multiple read requests. The AUX operation command "CMD_AUX_GET_KSV_LIST" reads the KSV list with AUX FIFO and is able to read DP_AUX

[PATCH v5 06/10] drm/bridge: it6505: fix HDCP encryption when R0 ready

2024-09-30 Thread Hermes Wu
From: Hermes Wu When starting HDCP authentication, HDCP encryption should be enabled when R0'is checked. Change encryption enables time at R0' ready. The hardware HDCP engine trigger is changed and the repeater KSV fails will restart HDCP. Signed-off-by: Hermes Wu --- drivers/gpu/drm/bridge

[PATCH v5 05/10] drm/bridge: it6505: fix HDCP Bstatus check

2024-09-30 Thread Hermes Wu
From: Hermes Wu When HDCP is activated, a DisplayPort source receiving CP_IRQ from the sink shall check Bstatus from DPCD and process the corresponding value Signed-off-by: Hermes Wu --- drivers/gpu/drm/bridge/ite-it6505.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) dif

[PATCH v5 04/10] drm/bridge: it6505: Change definition MAX_HDCP_DOWN_STREAM_COUNT

2024-09-30 Thread Hermes Wu
From: Hermes Wu A HDCP source device shall support max downstream to 127 devices. Change definition MAX_HDCP_DOWN_STREAM_COUNT to 127 KSVs shall save for DRM blocked devices check. This results in struct it6505 growth by ~0.5 KiB. Signed-off-by: Hermes Wu --- drivers/gpu/drm/bridge/ite-it6505

[PATCH v5 03/10] drm/bridge: it6505: add AUX operation for HDCP KSV list read

2024-09-30 Thread Hermes Wu
From: Hermes Wu HDCP KSV list readback can choose to use AUX FIFO or general data register. For some DisplayPort devices, the KSV list must be read in 5 byte boundaries. The original AUX read command does not support these devices. The AUX command operation control register "REG_AUX_CMD_REQ" use

[PATCH v5 02/10] drm/bridge: it6505: improve AUX operation for edid read

2024-09-30 Thread Hermes Wu
From: Hermes Wu The original AUX operation using data registers is limited to 4 bytes. The AUX operation command CMD_AUX_I2C_EDID_READ uses AUX FIFO and is capable of reading 16 bytes. This improves the speed of EDID read. Signed-off-by: Hermes Wu --- drivers/gpu/drm/bridge/ite-it6505.c | 10

[PATCH v5 01/10] drm/bridge: it6505: Change definition of AUX_FIFO_MAX_SIZE

2024-09-30 Thread Hermes Wu
From: Hermes Wu The hardware AUX FIFO is 16 bytes Change definition of AUX_FIFO_MAX_SIZE to 16 Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver") Signed-off-by: Hermes Wu --- drivers/gpu/drm/bridge/ite-it6505.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/

[PATCH v5 00/10]drm/bridge: it6505: fix HDCP CTS fail items and add MCCS support

2024-09-30 Thread Hermes Wu
From: Hermes Wu This is a v5 patch-set. There are lots of failure items while running HDCP CTS using UNIGRAF DPR-100. In Order to fix those failures, HDCP flow needs to be changed. The DisplayPort AUX protocol supports I2C transport. In Order to support MCCS via the aux channel, the aux-i2c ope

[PATCH v3 1/5] dt-bindings: display/msm: Document MDSS on SA8775P

2024-09-30 Thread Mahadevan via B4 Relay
From: Mahadevan Document the MDSS hardware found on the Qualcomm SA8775P platform. Signed-off-by: Mahadevan --- .../bindings/display/msm/qcom,sa8775p-mdss.yaml| 241 + 1 file changed, 241 insertions(+) diff --git a/Documentation/devicetree/bindings/display/msm/qcom,sa

[PATCH v3 2/5] dt-bindings: display/msm: Document the DPU for SA8775P

2024-09-30 Thread Mahadevan via B4 Relay
From: Mahadevan Document the DPU for Qualcomm SA8775P platform. Signed-off-by: Mahadevan --- .../bindings/display/msm/qcom,sa8775p-dpu.yaml | 122 + 1 file changed, 122 insertions(+) diff --git a/Documentation/devicetree/bindings/display/msm/qcom,sa8775p-dpu.yaml b/D

[PATCH v3 0/5] Display enablement changes for Qualcomm SA8775P platform

2024-09-30 Thread Mahadevan via B4 Relay
anged, 951 insertions(+) --- base-commit: e390603cfa79c860ed35e073f5fe77805b067a8e change-id: 20240930-patchv3_1-600cbc1549e8 Best regards, -- Mahadevan

[PATCH v3 5/5] arm64: dts: qcom: sa8775p: add display dt nodes for MDSS0 and DPU

2024-09-30 Thread Mahadevan via B4 Relay
From: Mahadevan Add devicetree changes to enable MDSS0 display-subsystem its display-controller(DPU) for Qualcomm SA8775P platform. Signed-off-by: Mahadevan --- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 89 +++ 1 file changed, 89 insertions(+) diff --git a/arch/a

[PATCH v3 4/5] drm/msm/dpu: Add SA8775P support

2024-09-30 Thread Mahadevan via B4 Relay
From: Mahadevan Add definitions for the display hardware used on the Qualcomm SA8775P platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Mahadevan --- .../drm/msm/disp/dpu1/catalog/dpu_8_4_sa8775p.h| 485 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 1 +

[PATCH v3 3/5] drm/msm: mdss: Add SA8775P support

2024-09-30 Thread Mahadevan via B4 Relay
From: Mahadevan Add Mobile Display Subsystem (MDSS) support for the SA8775P platform. Signed-off-by: Mahadevan --- drivers/gpu/drm/msm/msm_mdss.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c index faa88fd6eb4d

[PATCH] drm/i915: Rename functions in the docs to match code changes

2024-09-30 Thread Harshit Mogalapalli
make htmldocs is reporting: drivers/gpu/drm/i915/i915_irq.c:1: warning: 'intel_runtime_pm_disable_interrupts' not found drivers/gpu/drm/i915/i915_irq.c:1: warning: 'intel_runtime_pm_enable_interrupts' not found intel_runtime_pm_disable_interrupts() is renamed to intel_irq_suspend(), make docume

Re: [PATCH v7 2/5] drm: Expose wedge recovery methods

2024-09-30 Thread Raag Jadav
On Mon, Sep 30, 2024 at 04:01:38PM +0300, Andy Shevchenko wrote: > On Mon, Sep 30, 2024 at 01:08:42PM +0530, Raag Jadav wrote: > > Now that we have device wedged event in place, add wedge_recovery sysfs > > attribute which will expose recovery methods supported by the DRM device. > > This is useful

Re: [PATCH v7 1/5] drm: Introduce device wedged event

2024-09-30 Thread Raag Jadav
On Mon, Sep 30, 2024 at 03:59:59PM +0300, Andy Shevchenko wrote: > On Mon, Sep 30, 2024 at 01:08:41PM +0530, Raag Jadav wrote: > > Introduce device wedged event, which will notify userspace of wedged > > (hanged/unusable) state of the DRM device through a uevent. This is > > useful especially in ca

Re: [PATCH v3] drm/meson: switch to a managed drm device

2024-09-30 Thread kernel test robot
Hi Anastasia, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on v6.12-rc1 next-20240930] [cannot apply to drm-misc/drm-misc-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

Kernel doesn't boot after DRM updates (drm-next-2024-09-19)

2024-09-30 Thread Christian Zigotzky
On 30 September 2024 3:27pm, Alex Deucher wrote: + Wu Hoi Pok This is likely related to the drm device rework. Alex —- Hi All, I was able to revert the drm-next-2024-09-19 updates for the RC1 of kernel 6.12. This kernel works on all machines without any problems. This means, the new R

linux-next: build warning after merge of the drm-intel tree

2024-09-30 Thread Stephen Rothwell
Hi all, After merging the drm-intel tree, today's linux-next build (htmldocs) produced this warning: drivers/gpu/drm/i915/i915_irq.c:1: warning: 'intel_runtime_pm_disable_interrupts' not found drivers/gpu/drm/i915/i915_irq.c:1: warning: 'intel_runtime_pm_enable_interrupts' not found Introduced

linux-next: build failure after merge of the drm-xe tree

2024-09-30 Thread Stephen Rothwell
Hi all, After merging the drm-xe tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/gpu/drm/xe/display/xe_display.c: In function 'xe_display_pm_shutdown': drivers/gpu/drm/xe/display/xe_display.c:382:27: error: passing argument 1 of 'intel_dmc_suspend' from incompatibl

Re: [PATCH v6 11/11] Documentation: document adreno preemption

2024-09-30 Thread Bagas Sanjaya
On Thu, Sep 26, 2024 at 11:16:53PM +0200, Antonino Maniscalco wrote: > +.. SPDX-License-Identifier: GPL-2.0 > + > +:orphan: Why don't this be added to toctree in Documentation/gpu/index.rst? > + > += > +MSM Preemtion > += s/Preemtion/Preemption/ > +This mechanism can be

Re: [PATCH v3 02/19] crypto: testmgr: Include instead of

2024-09-30 Thread Herbert Xu
On Mon, Sep 30, 2024 at 02:33:13PM +0200, Uros Bizjak wrote: > Substitute the inclusion of header with > to allow the removal of legacy inclusion > of from . > > Signed-off-by: Uros Bizjak > Cc: Herbert Xu > Cc: "David S. Miller" > --- > crypto/testmgr.c | 2 +- > 1 file changed, 1 insertio

Re: [WIP RFC v2 00/35] Rust bindings for KMS + RVKMS

2024-09-30 Thread Lyude Paul
Also - I mentioned their name a number of times, but I almost forgot: I'd like to explicitly thank the Asahi project for all of their work! Without it none of this would have been possible :) On Mon, 2024-09-30 at 19:09 -0400, Lyude Paul wrote: > Hi again! It's been a while since the last time I s

[WIP RFC v2 35/35] WIP: drm: Introduce RVKMS!

2024-09-30 Thread Lyude Paul
Now that we've added all of the bits that we need for the KMS API, it's time to introduce rvkms! This is a port of the VKMS driver to rust, with the intent of acting as an example usecase of the KMS bindings that we've come up with so far in preparation for writing a display driver for nova. Curre

[WIP RFC v2 34/35] WIP: rust: drm/kms: Add Kms::atomic_commit_tail

2024-09-30 Thread Lyude Paul
A quick note: this is one of my favorite bindings so far :). It sounds way overly complicated, but so far actually writing implementations of this in rust has been a breeze. Anyway: RVKMS has a slightly different atomic_commit_tail than normal, which means we need to write up some bindings for ato

[WIP RFC v2 33/35] WIP: rust: drm/kms: Add VblankSupport

2024-09-30 Thread Lyude Paul
This commit adds bindings for implementing vblank support for a driver's CRTCs. These bindings are optional, to account for the fact that not all drivers have dedicated hardware vblanks. In order to accomplish this, we introduce the VblankSupport trait which can be implemented on DriverCrtc by dri

[WIP RFC v2 32/35] rust: drm/kms: Add Device::num_crtcs()

2024-09-30 Thread Lyude Paul
A binding for checking drm_device.num_crtcs. We'll need this in a moment for vblank support, since setting it up requires knowing the number of CRTCs that a driver has initialized. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms.rs | 25 + 1 file changed, 21 insertions(

[WIP RFC v2 31/35] rust: drm: Add Device::event_lock()

2024-09-30 Thread Lyude Paul
This is just a crate-private helper to use Lock::from_raw() to provide an immutable reference to the DRM event_lock, so that it can be used like a normal rust spinlock. We'll need this for adding vblank related bindings. Signed-off-by: Lyude Paul --- rust/kernel/drm/device.rs | 7 +++ 1 file

[WIP RFC v2 30/35] rust: drm/kms: Add DriverCrtc::atomic_enable() and atomic_disable()

2024-09-30 Thread Lyude Paul
Optional trait methods for implementing the atomic_enable and atomic_disable callbacks of a CRTC. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/crtc.rs | 76 - 1 file changed, 74 insertions(+), 2 deletions(-) diff --git a/rust/kernel/drm/kms/crtc.rs b/rus

[WIP RFC v2 29/35] rust: drm/kms: Add DriverCrtc::atomic_begin() and atomic_flush()

2024-09-30 Thread Lyude Paul
Optional trait methods for implementing the atomic_begin and atomic_flush callbacks for a CRTC. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/crtc.rs | 78 - 1 file changed, 76 insertions(+), 2 deletions(-) diff --git a/rust/kernel/drm/kms/crtc.rs b/rust/

[WIP RFC v2 28/35] rust: drm/kms: Add RawPlane::framebuffer()

2024-09-30 Thread Lyude Paul
Returns the Framebuffer currently assigned in an atomic plane state. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/plane.rs | 8 1 file changed, 8 insertions(+) diff --git a/rust/kernel/drm/kms/plane.rs b/rust/kernel/drm/kms/plane.rs index cd5167e6441f1..15efa53fda8d3 100644 --- a/

[WIP RFC v2 27/35] rust: drm/kms: Add drm_framebuffer bindings

2024-09-30 Thread Lyude Paul
This adds some very simple bindings for drm_framebuffer. We don't use them much yet, but we'll eventually be using them when rvkms eventually gets CRC and writeback support. Just like Connector objects, these use RcModeObject. Signed-off-by: Lyude Paul --- rust/bindings/bindings_helper.h| 1

[WIP RFC v2 26/35] WIP: rust: drm/kms: Add RawPlaneState::atomic_helper_check()

2024-09-30 Thread Lyude Paul
Add a binding for drm_atomic_helper_check_plane_state(). Since we want to make sure that the user is passing in the new state for a Crtc instead of an old state, we explicitly ask for a reference to a BorrowedCrtcState. Signed-off-by: Lyude Paul --- TODO: * Add support for scaling options Sign

[WIP RFC v2 25/35] rust: drm/kms: Add RawPlaneState::crtc()

2024-09-30 Thread Lyude Paul
Add a binding for checking drm_plane_state.crtc. Note that we don't have a way of knowing what DriverCrtc implementation would be used here (and want to make this function also available on OpaquePlaneState types), so we return an OpaqueCrtc. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/pla

[WIP RFC v2 24/35] rust: drm/kms: Add RawCrtcState::active()

2024-09-30 Thread Lyude Paul
A binding for checking drm_crtc_state.active. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/crtc.rs | 8 1 file changed, 8 insertions(+) diff --git a/rust/kernel/drm/kms/crtc.rs b/rust/kernel/drm/kms/crtc.rs index 43c7264402b07..ec9b58763dcca 100644 --- a/rust/kernel/drm/kms/crtc.r

[WIP RFC v2 23/35] rust: drm/kms: Add DriverPlane::atomic_check()

2024-09-30 Thread Lyude Paul
Optional trait method for implementing a plane's atomic_check(). Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/plane.rs | 41 +++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/rust/kernel/drm/kms/plane.rs b/rust/kernel/drm/kms/plane.rs index 5

[WIP RFC v2 22/35] rust: drm/kms: Add DriverPlane::atomic_update()

2024-09-30 Thread Lyude Paul
A mandatory trait method used for implementing DRM's atomic plane update callback. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/plane.rs | 39 +++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/rust/kernel/drm/kms/plane.rs b/rust/kernel/drm/km

[WIP RFC v2 21/35] rust: drm/kms: Introduce DriverCrtc::atomic_check()

2024-09-30 Thread Lyude Paul
An optional trait method for implementing a CRTC's atomic state check. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/crtc.rs | 46 +++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/rust/kernel/drm/kms/crtc.rs b/rust/kernel/drm/kms/crtc.rs in

[WIP RFC v2 20/35] WIP: rust: drm/kms: Add drm_atomic_state bindings

2024-09-30 Thread Lyude Paul
Next up is introducing bindings that we can use to represent the global DRM atomic state, along with all of the various object states contained within. We do this by introducing a few new concepts: borrowed states, atomic state mutators, and atomic state composers. To understand these, we need to

[WIP RFC v2 18/35] rust: drm/kms: Add RawPlane and RawPlaneState

2024-09-30 Thread Lyude Paul
Same thing as RawCrtc and RawCrtcState, but for DRM planes now Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/plane.rs | 35 +++ 1 file changed, 35 insertions(+) diff --git a/rust/kernel/drm/kms/plane.rs b/rust/kernel/drm/kms/plane.rs index 3ace487316d46..1c15

[WIP RFC v2 19/35] WIP: rust: drm/kms: Add OpaqueEncoder

2024-09-30 Thread Lyude Paul
Same thing as OpaquePlane, but for encoders now. Signed-off-by: Lyude Paul --- TODO: * Add upcast functions for this Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/encoder.rs | 55 ++ 1 file changed, 55 insertions(+) diff --git a/rust/kernel/drm/kms/encode

[WIP RFC v2 17/35] rust: drm/kms: Add RawCrtc and RawCrtcState

2024-09-30 Thread Lyude Paul
Same thing as RawConnector and RawConnectorState, just for CRTCs now. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/crtc.rs | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/rust/kernel/drm/kms/crtc.rs b/rust/kernel/drm/kms/crtc.rs index 1a3c9c448

[WIP RFC v2 16/35] rust: drm/kms: Add RawConnector and RawConnectorState

2024-09-30 Thread Lyude Paul
Now that we have more then one way to refer to connectors, we also want to ensure that any methods which are common to any kind of connector type can be used on all connector representations. This is where RawConnector and RawConnectorState come in: we implement these traits for any type which impl

[WIP RFC v2 15/35] WIP: rust: drm/kms: Add OpaquePlane and OpaquePlaneState

2024-09-30 Thread Lyude Paul
Same thing as OpaqueCrtc and OpaqueCrtcState, but for plane states now. Signed-off-by: Lyude Paul --- TODO: * Finish adding upcast functions. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/plane.rs | 143 +++ 1 file changed, 143 insertions(+) diff --git a/

[WIP RFC v2 14/35] WIP: rust: drm/kms: Add OpaqueCrtc and OpaqueCrtcState

2024-09-30 Thread Lyude Paul
This is the same thing as OpaqueConnector and OpaqueConnectorState, but for CRTCs now. Signed-off-by: Lyude Paul --- TODO: * Add upcast functions Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/crtc.rs | 131 1 file changed, 131 insertions(+) diff --gi

[WIP RFC v2 13/35] WIP: rust: drm/kms: Add OpaqueConnector and OpaqueConnectorState

2024-09-30 Thread Lyude Paul
Since we allow drivers to have multiple implementations of DriverConnector and DriverConnectorState (in C, the equivalent of this is having multiple structs which embed drm_connector) - there are some situations we will run into where it's not possible for us to know the corresponding DriverConnect

[WIP RFC v2 12/35] rust: drm/kms: Add ConnectorGuard::set_preferred_mode

2024-09-30 Thread Lyude Paul
Add a wrapper for `drm_set_preferred_mode()` for our new `ConnectorGuard` type so we can set the preferred mode for RVKMS connectors. Signed-off-by: Lyude Paul --- rust/kernel/drm/kms/connector.rs | 6 ++ 1 file changed, 6 insertions(+) diff --git a/rust/kernel/drm/kms/connector.rs b/rust/k

[WIP RFC v2 11/35] rust: drm/kms: Add ConnectorGuard::add_modes_noedid()

2024-09-30 Thread Lyude Paul
A simple binding for drm_add_modes_noedid() using the ConnectorGuard type we just added. Signed-off-by: Lyude Paul --- rust/bindings/bindings_helper.h | 2 ++ rust/kernel/drm/kms/connector.rs | 11 +++ 2 files changed, 13 insertions(+) diff --git a/rust/bindings/bindings_helper.h b/ru

[WIP RFC v2 10/35] rust: drm/kms: Add DriverConnector::get_mode callback

2024-09-30 Thread Lyude Paul
Next up is filling out some of the basic connector hotplugging callbacks - which we'll need for setting up the fbdev helpers for KMS devices. Note that connector hotplugging in DRM follows a BFL scheme: pretty much all probing is protected under the mighty drm_device->mode_config.lock, which of cou

[WIP RFC v2 09/35] WIP: rust: drm/kms: Add Connector.attach_encoder()

2024-09-30 Thread Lyude Paul
This adds a simple binding for completing the last step of creating a DRM connector - attaching its encoder. This function should only be called before the connector is registered, and DRM should enforce this itself by returning an error if a driver tries to add an encoder to an already-registered

[WIP RFC v2 08/35] rust: drm/kms: Add bindings for drm_encoder

2024-09-30 Thread Lyude Paul
The last thing we need to be able to register a KMS driver is the ability to create DRM encoders, so let's add bindings for that. Again, these bindings follow the same general pattern as CRTCs, planes, and connector with one difference: encoders don't have an atomic state. Note that not having an

[WIP RFC v2 07/35] WIP: rust: drm/kms: Add drm_crtc bindings

2024-09-30 Thread Lyude Paul
This introduces basic bindings for DRM CRTCs which follow the same general pattern as connectors and planes (e.g. AsRawCrtc, AsRawCrtcState, etc.). There is one big difference though - drm_crtc_state appears to be the one atomic state that actually has data which can be mutated from outside of the

[WIP RFC v2 06/35] rust: drm/kms: Add drm_plane bindings

2024-09-30 Thread Lyude Paul
The next step is adding a set of basic bindings to create a plane, which has to happen before we can create a CRTC (since we need to be able to at least specify a primary plane for a CRTC upon creation). This mostly follows the same general pattern as connectors (AsRawPlane, AsRawPlaneState, etc.).

[WIP RFC v2 05/35] rust: drm/kms: Add bindings for drm_connector

2024-09-30 Thread Lyude Paul
We start off by introducing wrappers for the first important type of mode object: a DRM display connector. This introduces Connector and ConnectorState. Both DriverConnector and DriverConnectorState must be implemented by KMS drivers, and a driver may have as many implementations of these two trait

[WIP RFC v2 04/35] rust: drm/kms: Introduce the main ModeConfigObject traits

2024-09-30 Thread Lyude Paul
The KMS API has a very consistent idea of a "mode config object", which includes any object with a drm_mode_object struct embedded in it. These objects have their own object IDs which DRM exposes to userspace, and we introduce the ModeConfigObject trait to represent any object matching these charac

[WIP RFC v2 03/35] rust: drm/kms/fbdev: Add FbdevShmem

2024-09-30 Thread Lyude Paul
For drivers which use the shmem based GEM helpers, they'll want to use the relevant drm_fbdev_shmem_setup() functions instead of the drm_fbdev_dma_setup() functions. To allow for this, introduce another FbdevImpl that such drivers can use instead of FbdevDma. Signed-off-by: Lyude Paul --- rust/b

[WIP RFC v2 02/35] WIP: rust: drm: Add traits for registering KMS devices

2024-09-30 Thread Lyude Paul
This commit adds some traits for registering DRM devices with KMS support, implemented through the kernel::drm::kms::Kms trait. Devices which don't have KMS support can simply use PhantomData. Signed-off-by: Lyude Paul --- TODO: * Generate feature flags automatically, these shouldn't need to be

[WIP RFC v2 01/35] WIP: rust/drm: Add fourcc bindings

2024-09-30 Thread Lyude Paul
This adds some very basic rust bindings for fourcc. We only have a single format code added for the moment, but this is enough to get a driver registered. TODO: * Write up something to automatically generate constants from the fourcc headers Signed-off-by: Lyude Paul --- rust/bindings/binding

[WIP RFC v2 00/35] Rust bindings for KMS + RVKMS

2024-09-30 Thread Lyude Paul
Hi again! It's been a while since the last time I sent this, there's still a good bit of work to do here but I think there's more then enough to start reviewing the design I have so far :) - especially since I'll be presenting this work at XDC2024 this year. This patch series introduces a WIP set

Re: [syzbot] [dri?] WARNING in drm_wait_one_vblank (2)

2024-09-30 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:9852d85ec9d4 Linux 6.12-rc1 git tree: upstream console+strace: https://syzkaller.appspot.com/x/log.txt?x=131f5dd058 kernel config: https://syzkaller.appspot.com/x/.config?x=286b31f2cf1c36b5 dashboard link: https:/

[PATCH] drm/etnaviv: Print error message if inserting IOVA address range fails

2024-09-30 Thread Sui Jingfeng
Etnaviv assumes that GPU page size is 4KiB, yet on some systems, the CPU page size is 16 KiB. The size of etnaviv buffer objects will be aligned to CPU page size on kernel side, however, userspace still assumes the page size is 4KiB and doing allocation with 4KiB page as unit. This results in softp

[PATCH v3 0/2] Add Samsung AMS639RQ08 panel support

2024-09-30 Thread Danila Tikhonov
This series adds Samsung AMS639RQ08 panel support used in: - Xiaomi Mi 9 Lite / CC9 (sdm710-xiaomi-pyxis) - Xiaomi Mi 9T / Redmi K20 (sm7150-xiaomi-davinci) - Xiaomi Mi 9T Pro / Redmi K20 Pro (sm8150-xiaomi-raphael) Was tested on sm7150-xiaomi-davinci and sm8150-xiaomi-raphael. Based on my analysi

[PATCH v3 1/2] dt-bindings: display: panel: Add Samsung AMS639RQ08

2024-09-30 Thread Danila Tikhonov
The Samsung AMS639RQ08 is a 6.39 inch 1080x2340 MIPI-DSI CMD mode AMOLED panel used in: - Xiaomi Mi 9 Lite / CC9 (sdm710-xiaomi-pyxis) - Xiaomi Mi 9T / Redmi K20 (sm7150-xiaomi-davinci) - Xiaomi Mi 9T Pro / Redmi K20 Pro (sm8150-xiaomi-raphael) Add a dt-binding for it. Signed-off-by: Danila Tikhon

[PATCH v3 2/2] drm/panel: Add Samsung AMS639RQ08 panel driver

2024-09-30 Thread Danila Tikhonov
Add the driver for Samsung AMS639RQ08 FHD Plus CMD mode panel support found in: - Xiaomi Mi 9 Lite / CC9 (sdm710-xiaomi-pyxis) - Xiaomi Mi 9T / Redmi K20 (sm7150-xiaomi-davinci) - Xiaomi Mi 9T Pro / Redmi K20 Pro (sm8150-xiaomi-raphael) Tested-by: Degdag Mohamed # xiaomi-raphael Tested-by: Jens R

Re: [PATCH v3] drm/meson: switch to a managed drm device

2024-09-30 Thread kernel test robot
Hi Anastasia, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on v6.12-rc1 next-20240930] [cannot apply to drm-misc/drm-misc-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

[PATCH v2 17/31] accel/ivpu: Print JSM message result in case of error

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski Change debug message to error level in case of receiving non-successful result of JSM message. Signed-off-by: Karol Wachowski Reviewed-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_ipc.c | 2 +- 1 file chan

[PATCH v2 09/31] accel/ivpu: Set 500 ns delay between power island TRICKLE and ENABLE

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski Follow HW documentation recommendation of 500 ns delay between setting AON_PWR_ISLAND_TRICKLE_EN and AON_PWR_ISLAND_EN registers during power island enabling. Previously this was only done correctly for VPU 4+. VPU 3.7 had the delay added after power island disable where it

[PATCH v2 08/31] accel/ivpu: Add FW state dump on TDR

2024-09-30 Thread Jacek Lawrynowicz
From: Tomasz Rusinowicz Send JSM state dump message at the beginning of TDR handler. This allows FW to collect debug info in the FW log before the state of the NPU is lost allowing to analyze the cause of a TDR. Wait a predefined timeout (10 ms) so the FW has a chance to write debug logs. We can

[PATCH v2 04/31] accel/ivpu: Refactor functions in ivpu_fw_log.c

2024-09-30 Thread Jacek Lawrynowicz
Make function names more consistent and (arguably) readable in fw log code. Add fw_log_print_all_in_bo() that remove duplicated code in ivpu_fw_log_print(). Signed-off-by: Jacek Lawrynowicz Reviewed-by: Tomasz Rusinowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 2 +- drivers/accel/ivpu/ivpu_fw_

[PATCH v2 15/31] accel/ivpu: Add one jiffy to bo_wait_ioctl timeout value

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski Add one jiffy to ensure wait function never times out before intended timeout value, which could happen if absolute timeout value is less than (1s / CONFIG_HZ) in the future. Signed-off-by: Karol Wachowski Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz -

[PATCH v2 05/31] accel/ivpu: Fix fw log printing

2024-09-30 Thread Jacek Lawrynowicz
- Fix empty log detection that couldn't work without read_wrap_count - Start printing wrapped log from correct position (log_start) - Properly handle logs that are wrapped multiple times in reference to reader position - Don't add a newline when log buffer is wrapped - Always add a ne

[PATCH v2 02/31] accel/ivpu: Rename ivpu_log_level to fw_log_level

2024-09-30 Thread Jacek Lawrynowicz
Rename module param ivpu_log_level to fw_log_level, so it is clear what log level is actually changed. Reviewed-by: Maciej Falkowski Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_fw.c | 4 ++-- drivers/accel/ivpu/ivpu_fw_log.c | 12 ++-- dr

[PATCH v2 11/31] accel/ivpu: Add FW version debugfs entry

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski Add debugfs that prints current firmware version string on read. Signed-off-by: Karol Wachowski Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_debugfs.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/acc

[PATCH v2 29/31] accel/ivpu: Remove HWS_EXTRA_EVENTS from test modes

2024-09-30 Thread Jacek Lawrynowicz
IVPU_TEST_MODE_HWS_EXTRA_EVENTS was never used and can be safely removed Reviewed-by: Karol Wachowski Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.h | 1 - drivers/accel/ivpu/ivpu_jsm_msg.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/

[PATCH v2 25/31] accel/ivpu: Do not fail on cmdq if failed to allocate preemption buffers

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski Allow to proceed with job command queue creation even if preemption buffers failed to be allocated, print warning that preemption on such command queue will be disabled. Signed-off-by: Karol Wachowski Reviewed-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by

[PATCH v2 24/31] accel/ivpu: Remove invalid warnings

2024-09-30 Thread Jacek Lawrynowicz
Warn in ivpu_file_priv_put() checks a pointer that is previously accessed. Warn in ivpu_ipc_fini() can be triggered even in valid cases where IPC is disabled upon closing the device. Reviewed-by: Karol Wachowski Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/

[PATCH v2 23/31] accel/ivpu: Refactor failure diagnostics during boot

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski Move diagnostic functions to common error handling within ivpu_boot() function to ensure diagnostics are gathered even in cases where NPU fails after successful boot (DCT and HWS init failures). Signed-off-by: Karol Wachowski Reviewed-by: Jacek Lawrynowicz Reviewed-by: Je

[PATCH v2 19/31] accel/ivpu: Add test_mode bit to force turbo

2024-09-30 Thread Jacek Lawrynowicz
From: Andrzej Kacprowski Add new test_mode BIT(9) that forces firmware to enable turbo burst mode. Signed-off-by: Andrzej Kacprowski Reviewed-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.h | 1 + drivers/accel/ivpu/ivpu_job

[PATCH v2 28/31] accel/ivpu: Fix ivpu_jsm_dyndbg_control()

2024-09-30 Thread Jacek Lawrynowicz
Use correct channel for dyndbg JSM message. Reviewed-by: Karol Wachowski Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_jsm_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/ivpu/ivpu_jsm_msg.c b/drivers/accel/ivpu/

[PATCH v2 31/31] accel/ivpu: Fix typos in ivpu_pm.c

2024-09-30 Thread Jacek Lawrynowicz
Replace "Filed" with an actual word. Reviewed-by: Karol Wachowski Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/accel/ivpu/ivpu_pm.c b/drivers/accel/ivpu/ivpu_pm.c inde

[PATCH v2 20/31] accel/ivpu: Remove skip of clock own resource ack on Simics

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski With recent Simics model update CLOCK_RESOURCE_OWN_ACK signal was implemented as part of VPU STATUS register and workaround is no longer needed. Signed-off-by: Karol Wachowski Reviewed-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz ---

[PATCH v2 26/31] accel/ivpu: Use whole user and shave ranges for preemption buffers

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski Do not restrict range for preemption buffers allocation just to the end of user and shave ranges, use them whole instead to avoid situation where end of range might be already allocated causing preemption buffers allocation to fail. Signed-off-by: Karol Wachowski Reviewed-

[PATCH v2 27/31] accel/ivpu: Increase MS info buffer size

2024-09-30 Thread Jacek Lawrynowicz
Increase MS info BO to 64KB to allow collecting more metrics. Reviewed-by: Karol Wachowski Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_ms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/accel/ivpu/ivpu_ms.c b/drivers/acce

[PATCH v2 21/31] accel/ivpu: Fix reset_engine debugfs file logic

2024-09-30 Thread Jacek Lawrynowicz
From: Andrzej Kacprowski The current reset_engine implementation unconditionally resets all engines. Improve implementation to reset only the engine requested by the user space to allow more granular testing. Also use DEFINE_DEBUGFS_ATTRIBUTE() to simplify implementation. Same changes applied to

[PATCH v2 30/31] accel/ivpu: Add tracing for IPC/PM/JOB

2024-09-30 Thread Jacek Lawrynowicz
From: Jakub Pawlak Add multiple trace points in couple of key places to enable tracing with ftrace. Signed-off-by: Jakub Pawlak Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/Makefile| 5 +- drivers/accel/ivpu/ivpu_ipc.c | 3 ++

[PATCH v2 13/31] accel/ivpu: Remove 1-tile power up Simics workaround

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski Previously Simics was not providing workpoint for configurations with 0 tiles enabled, that had to be worked around in the KMD. This got fixed in Simics and workaround is no longer needed. Signed-off-by: Karol Wachowski Reviewed-by: Jacek Lawrynowicz Reviewed-by: Jeffrey

[PATCH v2 22/31] accel/ivpu: Prevent recovery invocation during probe and resume

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski Refactor IPC send and receive functions to allow correct handling of operations that should not trigger a recovery process. Expose ivpu_send_receive_internal(), which is now utilized by the D0i3 entry, DCT initialization, and HWS initialization functions. These functions ha

[PATCH v2 18/31] accel/ivpu: Make DB_ID and JOB_ID allocations incremental

2024-09-30 Thread Jacek Lawrynowicz
From: Tomasz Rusinowicz Save last used ID and use it to limit the possible values for the ID. This should decrease the rate at which the IDs are reused, which will make debugging easier. Signed-off-by: Tomasz Rusinowicz Reviewed-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: J

[PATCH v2 07/31] accel/ivpu: Add coredump support

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski Use coredump (if available) to collect FW logs in case of a FW crash. This makes dmesg more readable and allows to collect more log data. Signed-off-by: Karol Wachowski Reviewed-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz --- driver

[PATCH v2 12/31] accel/ivpu: Stop using hardcoded DRIVER_DATE

2024-09-30 Thread Jacek Lawrynowicz
Hardcoded driver date is useless, so use kernel version as a driver date to make identifying .ko file easier. Also allow to pass DRIVER_DATE on build time to allow versioning the driver in case it is built out of the tree. Reviewed-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- driver

[PATCH v2 14/31] accel/ivpu: Allow reading dvfs_mode debugfs file

2024-09-30 Thread Jacek Lawrynowicz
From: Andrzej Kacprowski Make the dvfs_mode read-write to allow checking current mode. Simplify the dvfs_mode implementation with the DEFINE_DEBUGFS_ATTRIBUTE. Signed-off-by: Andrzej Kacprowski Reviewed-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz --- dri

[PATCH v2 16/31] accel/ivpu: Add auto selection logic for job scheduler

2024-09-30 Thread Jacek Lawrynowicz
Add ivpu_fw_sched_mode_select() function that can select scheduling mode based on HW and FW versions. This prepares for a switch to HWS on selected platforms. Reviewed-by: Karol Wachowski Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_drv.c | 6 +++--- drivers/accel/ivpu/ivpu

[PATCH v2 10/31] accel/ivpu: Turn on autosuspend on Simics

2024-09-30 Thread Jacek Lawrynowicz
From: Karol Wachowski With recent Simics update DVFS flows using cdyn were fixed and it is possible to enable D0i3/D3 entry flows on autosuspend. Set autosuspend timeout to 100 ms by default on Simics. Signed-off-by: Karol Wachowski Reviewed-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Sig

[PATCH v2 06/31] accel/ivpu: Limit FW version string length

2024-09-30 Thread Jacek Lawrynowicz
Limit FW version string, when parsing FW binary, to 256 bytes and always add NULL-terminate it. Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_fw.c | 7 --- drivers/accel/ivpu/ivpu_fw.h | 6 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/accel/ivp

[PATCH v2 03/31] accel/ivpu: Reset fw log on cold boot

2024-09-30 Thread Jacek Lawrynowicz
From: Tomasz Rusinowicz Add ivpu_fw_log_reset() that resets the read_index of all FW logs on cold boot so logs are properly read. Signed-off-by: Tomasz Rusinowicz Reviewed-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Jacek Lawrynowicz --- drivers/accel/ivpu/ivpu_fw_log.c |

[PATCH v2 01/31] accel/ivpu: Update VPU FW API headers

2024-09-30 Thread Jacek Lawrynowicz
From: Andrzej Kacprowski This commit bumps: - Boot API from 3.24.0 to 3.26.3 - JSM API from 3.16.0 to 3.25.0 Signed-off-by: Andrzej Kacprowski Co-developed-by: Tomasz Rusinowicz Signed-off-by: Tomasz Rusinowicz Reviewed-by: Jacek Lawrynowicz Signed-off-by: Jacek Lawrynowicz --- drivers

  1   2   3   4   >