Re: [PATCH v7 0/8] Add a panel API to set orientation properly

2022-06-14 Thread Hsin-Yi Wang
On Thu, Jun 9, 2022 at 3:27 PM Hsin-Yi Wang wrote: > > Panels usually call drm_connector_set_panel_orientation(), which is > later than drm/kms driver calling drm_dev_register(). This leads to a > WARN()[1]. > > The orientation property is known earlier. For example, some panels > parse the

[PATCH] drm/sun4i: Fix crash during suspend after component bind failure

2022-06-14 Thread Samuel Holland
If the component driver fails to bind, or is unbound, the driver data for the top-level platform device points to a freed drm_device. If the system is then suspended, the driver passes this dangling pointer to drm_mode_config_helper_suspend(), which crashes. Fix this by only setting the driver

[PATCH v2 6/6] drm/sun4i: sun8i-hdmi-phy: Group PHY ops functions by generation

2022-06-14 Thread Samuel Holland
Now that the PHY ops are separated, sort them topologically, with the common sun8i_hdmi_phy_set_polarity helper at the top. No function contents are changed in this commit. Signed-off-by: Samuel Holland --- (no changes since v1) drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 67

[PATCH v2 4/6] drm/sun4i: sun8i-hdmi-phy: Support multiple custom PHY ops

2022-06-14 Thread Samuel Holland
The D1 SoC comes with a new custom HDMI PHY, which does not share any registers with the existing custom PHY. So it needs a new set of ops. Instead of providing a flag in the variant structure, provide the ops themselves. Signed-off-by: Samuel Holland --- (no changes since v1)

[PATCH v2 5/6] drm/sun4i: sun8i-hdmi-phy: Separate A83T and H3 PHY ops

2022-06-14 Thread Samuel Holland
Since the driver already needs to support multiple sets of ops, we can drop the mid-layer used by the A83T and H3 PHYs. They share only a small amount of code; factor this out as sun8i_hdmi_phy_set_polarity. For clarity, this commit keeps the existing function order. Signed-off-by: Samuel

[PATCH v2 3/6] drm/sun4i: sun8i-hdmi-phy: Used device-managed clocks/resets

2022-06-14 Thread Samuel Holland
Now that the HDMI PHY is using a platform driver, it can use device- managed resources. Use these, as well as the dev_err_probe helper, to simplify the probe function and get rid of the remove function. Signed-off-by: Samuel Holland --- Changes in v2: - Move error handling inside variant

[PATCH v2 2/6] drm/sun4i: sun8i-hdmi-phy: Use devm_platform_ioremap_resource

2022-06-14 Thread Samuel Holland
The struct resource is not used for anything else, so we can simplify the code a bit by using the helper function. Signed-off-by: Samuel Holland --- (no changes since v1) drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git

[PATCH v2 1/6] drm/sun4i: sun8i-hdmi-phy: Use of_device_get_match_data

2022-06-14 Thread Samuel Holland
Now that the HDMI PHY is using a platform driver, we can use the usual helper function for getting the variant structure. Signed-off-by: Samuel Holland --- (no changes since v1) drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h | 2 +- drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 11 ++- 2 files

[PATCH v2 0/6] drm/sun4i: HDMI PHY cleanup/refactoring

2022-06-14 Thread Samuel Holland
This series prepares the sun8i HDMI PHY driver for supporting the new custom PHY in the Allwinner D1 SoC. No functional change intended here. This series was tested on D1, H3, and H6. Changes in v2: - Move error handling inside variant checks in probe function Samuel Holland (6): drm/sun4i:

RE: [RESEND RFC 06/18] drm/display/dp_mst: Add some missing kdocs for atomic MST structs

2022-06-14 Thread Lin, Wayne
[Public] > -Original Message- > From: Lyude Paul > Sent: Wednesday, June 8, 2022 3:29 AM > To: dri-devel@lists.freedesktop.org; nouv...@lists.freedesktop.org; amd- > g...@lists.freedesktop.org > Cc: Lin, Wayne ; Ville Syrjälä > ; Zuo, Jerry ; Jani Nikula > ; Imre Deak ; Daniel Vetter >

RE: [RESEND RFC 04/18] drm/display/dp_mst: Call them time slots, not VCPI slots

2022-06-14 Thread Lin, Wayne
[Public] Thank you Lyude for addressing this! VCPI is also a confusing naming to me at first glance since it stands for Virtual Channel Payload Identification which is just an ID number ( we can look up these payload IDs In DPCD 0x2C1 ~0x2FF). I also look up left VCPI terms in rest of the

Re: [PATCH v9 05/14] dt-bindings: display: bridge: Add i.MX8qm/qxp display pixel link binding

2022-06-14 Thread Liu Ying
On Tue, 2022-06-14 at 14:11 -0600, Rob Herring wrote: > On Sat, Jun 11, 2022 at 10:14:12PM +0800, Liu Ying wrote: > > This patch adds bindings for i.MX8qm/qxp display pixel link. > > > > Signed-off-by: Liu Ying > > --- > > v8->v9: > > * Add 'fsl,dc-id' and 'fsl,dc-stream-id' properties.

Re: [RFC PATCH 3/5] drm/amdgpu: Allow explicit sync for VM ops.

2022-06-14 Thread Bas Nieuwenhuizen
Hi Christian, Friendly ping on the comments here. Are you okay with me re-spinning the series with a fixed patch 1 or do we need further discussion on the approach here? Thanks, Bas On Mon, Jun 6, 2022 at 1:00 PM Bas Nieuwenhuizen wrote: > > On Mon, Jun 6, 2022 at 12:35 PM Christian König >

[PATCH v2 2/2] drm/i915/gt: Cleanup interface for MCR operations

2022-06-14 Thread Matt Roper
Let's replace the assortment of intel_gt_* and intel_uncore_* functions that operate on MCR registers with a cleaner set of interfaces: * intel_gt_mcr_read -- unicast read from specific instance * intel_gt_mcr_read_any[_fw] -- unicast read from any non-terminated instance *

[PATCH v2 0/2] i915: Extract, polish, and document multicast handling

2022-06-14 Thread Matt Roper
Multicast/replicated (MCR) registers on Intel hardware are a purely GT-specific concept. Rather than leaving MCR register handling spread across several places throughout the driver (intel_uncore.c, intel_gt.c, etc.) with confusing combinations of handler functions living in different namespaces,

[PATCH v2 1/2] drm/i915/gt: Move multicast register handling to a dedicated file

2022-06-14 Thread Matt Roper
Handling of multicast/replicated registers is spread across intel_gt.c and intel_uncore.c today. As multicast handling and the related steering logic gets more complicated with the addition of new platforms and new rules it makes sense to centralize it all in one place. For now the existing

[PATCH 2/2] arm64: dts: qcom: sm8250: Enable per-process page tables.

2022-06-14 Thread Emma Anholt
This is an SMMU for the adreno gpu, and adding this compatible lets the driver use per-fd page tables, which are required for security between GPU clients. Signed-off-by: Emma Anholt --- Tested with a full deqp-vk run on RB5, which did involve some iommu faults.

[PATCH 1/2] iommu: arm-smmu-impl: Add 8250 display compatible to the client list.

2022-06-14 Thread Emma Anholt
Required for turning on per-process page tables for the GPU. Signed-off-by: Emma Anholt --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c index

Re: [PATCH v6] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Kuogee Hsieh
On 6/14/2022 2:59 PM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-06-14 14:05:02) Display resolution change is implemented through drm modeset. Older modeset (resolution) has to be disabled first before newer modeset (resolution) can be enabled. Display disable will turn off both pixel

Re: [PATCH v6] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Kuogee Hsieh
On 6/14/2022 2:59 PM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-06-14 14:05:02) Display resolution change is implemented through drm modeset. Older modeset (resolution) has to be disabled first before newer modeset (resolution) can be enabled. Display disable will turn off both pixel

Re: [PATCH v6] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Stephen Boyd
Quoting Kuogee Hsieh (2022-06-14 14:05:02) > Display resolution change is implemented through drm modeset. Older > modeset (resolution) has to be disabled first before newer modeset > (resolution) can be enabled. Display disable will turn off both > pixel clock and main link clock so that main

Re: [PATCH v3 2/4] drm/panel-edp: Take advantage of wait_hpd_asserted() in struct drm_dp_aux

2022-06-14 Thread Doug Anderson
Hi, On Thu, Jun 2, 2022 at 8:12 AM Dmitry Baryshkov wrote: > > On 18/04/2022 20:17, Douglas Anderson wrote: > > Let's add support for being able to read the HPD pin even if it's > > hooked directly to the controller. This will allow us to get more > > accurate delays also lets us take away the

[PATCH v4 4/4] drm/bridge: parade-ps8640: Provide wait_hpd_asserted() in struct drm_dp_aux

2022-06-14 Thread Douglas Anderson
This implements the callback added by the patch ("drm/dp: Add wait_hpd_asserted() callback to struct drm_dp_aux"). With this change and all the two "DP AUX Endpoint" drivers changed to use wait_hpd_asserted(), we no longer need to have an long delay in the AUX transfer function. It's up to the

[PATCH v4 3/4] drm/panel: atna33xc20: Take advantage of wait_hpd_asserted() in struct drm_dp_aux

2022-06-14 Thread Douglas Anderson
Let's add support for being able to read the HPD pin even if it's hooked directly to the controller. This will let us take away the waiting in the AUX transfer functions of the eDP controller drivers. Signed-off-by: Douglas Anderson --- Changes in v4: - Reorganized logic as per Dmitry's

[PATCH v4 2/4] drm/panel-edp: Take advantage of wait_hpd_asserted() in struct drm_dp_aux

2022-06-14 Thread Douglas Anderson
Let's add support for being able to read the HPD pin even if it's hooked directly to the controller. This will allow us to get more accurate delays also lets us take away the waiting in the AUX transfer functions of the eDP controller drivers. Signed-off-by: Douglas Anderson Reviewed-by: Dmitry

[PATCH v4 0/4] drm/dp: Introduce wait_hpd_asserted() for the DP AUX bus

2022-06-14 Thread Douglas Anderson
This is the 2nd four patches from my RFC series ("drm/dp: Improvements for DP AUX channel") [1]. I've broken the series in two so we can make progress on the two halves separately. v2 of this series changes to add wait_hpd_asserted() instead of is_hpd_asserted(). This allows us to move the extra

[PATCH v4 1/4] drm/dp: Add wait_hpd_asserted() callback to struct drm_dp_aux

2022-06-14 Thread Douglas Anderson
Sometimes it's useful for users of the DP AUX bus (like panels) to be able to poll HPD. Let's add a callback that allows DP AUX busses drivers to provide this. Suggested-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson Reviewed-by: Dmitry Baryshkov --- Changes in v4: - Comments now

RE: [Intel-gfx] [RFC v3 1/3] drm/doc/rfc: VM_BIND feature design document

2022-06-14 Thread Zeng, Oak
Thanks, Oak > -Original Message- > From: dri-devel On Behalf Of > Zeng, Oak > Sent: June 14, 2022 5:13 PM > To: Vishwanathapura, Niranjana ; > Landwerlin, Lionel G > Cc: Intel GFX ; Wilson, Chris P > ; Hellstrom, Thomas > ; Maling list - DRI developers de...@lists.freedesktop.org>;

[PATCH v2 3/3] drm/msm/dpu: Add interface support for CRC debugfs

2022-06-14 Thread Jessica Zhang
Add support for writing CRC values for the interface block to the debugfs by calling the necessary MISR setup/collect methods. Changes since V1: - Set values_cnt to only include phys with backing hw_intf - Loop over all drm_encs connected to crtc Signed-off-by: Jessica Zhang ---

[PATCH v2 2/3] drm/msm/dpu: Add MISR register support for interface

2022-06-14 Thread Jessica Zhang
Add support for setting MISR registers within the interface Changes since V1: - Replaced dpu_hw_intf collect_misr and setup_misr implementations with calls to dpu_hw_utils helper methods Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 19 ++-

[PATCH v2 0/3] Expand CRC to support interface blocks

2022-06-14 Thread Jessica Zhang
Refactor existing CRC code for layer mixer and add CRC support for interface blocks Changes since V1: - Create helper methods for collect_misr and setup_misr in dpu_hw_util.c - Move common bitmasks into dpu_hw_util.h - Update copyrights - Create a dynamically allocated crcs array in

[PATCH v2 1/3] drm/msm/dpu: Move LM CRC code into separate method

2022-06-14 Thread Jessica Zhang
Move layer mixer-specific section of dpu_crtc_get_crc() into a separate helper method. This way, we can make it easier to get CRCs from other HW blocks by adding other get_crc helper methods. Changes since V1: - Moved common bitmasks to dpu_hw_util.h - Moved common CRC methods to dpu_hw_util.c -

RE: [Intel-gfx] [RFC v3 1/3] drm/doc/rfc: VM_BIND feature design document

2022-06-14 Thread Zeng, Oak
Thanks, Oak > -Original Message- > From: Vishwanathapura, Niranjana > Sent: June 14, 2022 1:02 PM > To: Landwerlin, Lionel G > Cc: Zeng, Oak ; Intel GFX g...@lists.freedesktop.org>; Maling list - DRI developers de...@lists.freedesktop.org>; Hellstrom, Thomas > ; Wilson, Chris P ; >

Re: [PATCH] drm/arm/hdlcd: Take over EFI framebuffer properly

2022-06-14 Thread Robin Murphy
On 2022-06-14 14:48, Thomas Zimmermann wrote: Hi Am 14.06.22 um 15:04 schrieb Robin Murphy: The Arm Juno board EDK2 port has provided an EFI GOP display via HDLCD0 for some time now, which works nicely as an early framebuffer. However, once the HDLCD driver probes and takes over the hardware,

[PATCH v6] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Kuogee Hsieh
Display resolution change is implemented through drm modeset. Older modeset (resolution) has to be disabled first before newer modeset (resolution) can be enabled. Display disable will turn off both pixel clock and main link clock so that main link have to be re-trained during display enable to

Re: [PATCH v3 4/7] dt-bindings: drm/bridge: anx7625: Add mode-switch support

2022-06-14 Thread Krzysztof Kozlowski
On 14/06/2022 12:34, Prashant Malani wrote: > Analogix 7625 can be used in systems to switch USB Type-C DisplayPort > alternate mode lane traffic between 2 Type-C ports. > > Update the binding to accommodate this usage by introducing a switch > property. > > Reviewed-by: Nícolas F. R. A. Prado

Re: [PATCH v5] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Kuogee Hsieh
On 6/14/2022 1:38 AM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-06-13 14:48:37) During display resolution changes display have to be disabled first followed by display enabling with new resolution. Display disable will turn off both pixel clock and main link clock so that main link have

Re: [PATCH v11 01/12] dt-bindings: mediatek,dpi: Add DP_INTF compatible

2022-06-14 Thread Rob Herring
On Mon, Jun 13, 2022 at 02:48:30PM +0800, Bo-Chen Chen wrote: > From: Markus Schneider-Pargmann > > DP_INTF is similar to DPI but does not have the exact same feature set > or register layouts. > > DP_INTF is the sink of the display pipeline that is connected to the > DisplayPort controller and

Re: [PATCH v11 01/10] dt-bindings: mediatek,dp: Add Display Port binding

2022-06-14 Thread Rob Herring
On Fri, Jun 10, 2022 at 06:55:13PM +0800, Bo-Chen Chen wrote: > From: Markus Schneider-Pargmann > > This controller is present on several mediatek hardware. Currently > mt8195 and mt8395 have this controller without a functional difference, > so only one compatible field is added. > > The

Re: [PATCH v9 05/14] dt-bindings: display: bridge: Add i.MX8qm/qxp display pixel link binding

2022-06-14 Thread Rob Herring
On Sat, Jun 11, 2022 at 10:14:12PM +0800, Liu Ying wrote: > This patch adds bindings for i.MX8qm/qxp display pixel link. > > Signed-off-by: Liu Ying > --- > v8->v9: > * Add 'fsl,dc-id' and 'fsl,dc-stream-id' properties. (Laurent) Why? Isn't the graph sufficient for determining the connections?

Re: [PATCH] drm/i915/guc: Check ctx while waiting for response

2022-06-14 Thread Dixit, Ashutosh
On Tue, 14 Jun 2022 09:28:14 -0700, Dixit, Ashutosh wrote: > On Thu, 02 Jun 2022 10:21:19 -0700, Zhanjun Dong wrote: > > > @@ -481,12 +481,14 @@ static int wait_for_ct_request_update(struct > > ct_request *req, u32 *status) > > #define GUC_CTB_RESPONSE_TIMEOUT_SHORT_MS 10 > > #define

[PATCH v3 7/7] drm/bridge: anx7625: Add typec_mux_set callback function

2022-06-14 Thread Prashant Malani
From: Pin-Yen Lin Add the callback function when the driver receives state changes of the Type-C port. The callback function configures the crosspoint switch of the anx7625 bridge chip, which can change the output pins of the signals according to the port state. Reviewed-by: Nícolas F. R. A.

[PATCH v3 6/7] drm/bridge: anx7625: Register Type-C mode switches

2022-06-14 Thread Prashant Malani
When the DT node has "switches" available, register a Type-C mode-switch for each listed "switch". This allows the driver to receive state information about what operating mode a Type-C port and its connected peripherals are in, as well as status information (like VDOs) related to that state. The

[PATCH v3 5/7] drm/bridge: anx7625: Register number of Type C switches

2022-06-14 Thread Prashant Malani
Parse the "switches" node, if available, and count and store the number of Type-C switches within it. Since we currently don't do anything with this info, no functional changes are expected from this change. This patch sets a foundation for the actual registering of Type-C switches with the

[PATCH v3 4/7] dt-bindings: drm/bridge: anx7625: Add mode-switch support

2022-06-14 Thread Prashant Malani
Analogix 7625 can be used in systems to switch USB Type-C DisplayPort alternate mode lane traffic between 2 Type-C ports. Update the binding to accommodate this usage by introducing a switch property. Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Signed-off-by: Prashant

[PATCH v3 3/7] dt-bindings: usb: Add Type-C switch binding

2022-06-14 Thread Prashant Malani
Introduce a binding which represents a component that can control the routing of USB Type-C data lines as well as address data line orientation (based on CC lines' orientation). Reviewed-by: Nícolas F. R. A. Prado Tested-by: Nícolas F. R. A. Prado Signed-off-by: Prashant Malani --- Changes

[PATCH v3 2/7] usb: typec: mux: Add CONFIG guards for functions

2022-06-14 Thread Prashant Malani
There are some drivers that can use the Type C mux API, but don't have to. Introduce CONFIG guards for the mux functions so that drivers can include the header file and not run into compilation errors on systems which don't have CONFIG_TYPEC enabled. When CONFIG_TYPEC is not enabled, the Type C

[PATCH v3 1/7] usb: typec: mux: Allow muxes to specify mode-switch

2022-06-14 Thread Prashant Malani
Loosen the typec_mux_match() requirements so that searches where an alt mode is not specified, but the target mux device lists the "mode-switch" property, return a success. This is helpful in Type C port drivers which would like to get a pointer to the mux switch associated with a Type C port,

[PATCH v3 0/7] usb: typec: Introduce typec-switch binding

2022-06-14 Thread Prashant Malani
This series introduces a binding for Type-C data lane switches. These control the routing and operating modes of USB Type-C data lanes based on the PD messaging from the Type-C port driver regarding connected peripherals. The first patch introduces a change to the Type-C mux class mode-switch

[PATCH 3/3] drm/msm/dpu: remove hard-coded linewidth limit for writeback

2022-06-14 Thread Abhinav Kumar
Remove the hard-coded limit for writeback and lets start using the one from catalog instead. Fixes: d7d0e73f7de3 ("introduce the dpu_encoder_phys_* for writeback") Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH 2/3] drm/msm/dpu: fix maxlinewidth for writeback block

2022-06-14 Thread Abhinav Kumar
Writeback block for sm8250 was using the default maxlinewidth of 2048. But this is not right as it supports upto 4096. This should have no effect on most resolutions as we are still limiting upto maxlinewidth of SSPP for adding the modes. Fix the maxlinewidth for writeback block on sm8250.

[PATCH 1/3] drm/msm/dpu: move intf and wb assignment to dpu_encoder_setup_display()

2022-06-14 Thread Abhinav Kumar
intf and wb resources are not dependent on the rm global state so need not be allocated during dpu_encoder_virt_atomic_mode_set(). Move the allocation of intf and wb resources to dpu_encoder_setup_display() so that we can utilize the hw caps even during atomic_check() phase. Since

Re: [PATCH v2 2/2] drm/virtio: fence created per cursor/plane update

2022-06-14 Thread Dongwon Kim
On Thu, Jun 09, 2022 at 06:24:43AM +0200, Gerd Hoffmann wrote: > On Fri, Jun 03, 2022 at 02:18:49PM -0700, Dongwon Kim wrote: > > Having one fence for a vgfb would cause conflict in case there are > > multiple planes referencing the same vgfb (e.g. Xorg screen covering > > two displays in extended

[PATCH 3/3] drm/i915: Do not use reserved requests for virtual engines

2022-06-14 Thread Ramalingam C
Do not use reserved requests for virtual engines as this is only needed for kernel contexts. Signed-off-by: Ramalingam C Suggested-by: Matthew Brost --- drivers/gpu/drm/i915/i915_request.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH 2/3] Revert "drm/i915: Hold reference to intel_context over life of i915_request"

2022-06-14 Thread Ramalingam C
From: Niranjana Vishwanathapura This reverts commit 1e98d8c52ed5dfbaf273c4423c636525c2ce59e7. The problem with this patch is that it makes i915_request to hold a reference to intel_context, which in turn holds a reference on the VM. This strong back referencing can lead to reference loops which

RE: [PATCH] drm/i915/guc: Check ctx while waiting for response

2022-06-14 Thread Dong, Zhanjun
Thanks for all comments, I will update code and prepare for next version. Regards, Zhanjun -Original Message- From: Dixit, Ashutosh Sent: June 14, 2022 12:28 PM To: Dong, Zhanjun Cc: intel-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org; Teres Alexis, Alan Previn ;

[PATCH 1/3] drm/i915: Do not access rq->engine without a reference

2022-06-14 Thread Ramalingam C
From: Niranjana Vishwanathapura In i915_fence_get_driver_name(), user may not hold a reference to rq->engine. Hence do not access it. Instead, store required device private pointer in 'rq->i915' and use it. Signed-off-by: Niranjana Vishwanathapura Suggested-by: Matthew Brost ---

[PATCH 0/3] Break VM to rq reference loop

2022-06-14 Thread Ramalingam C
The i915_request holds a reference to intel_context, which in turn holds a reference on the VM. But the dma-resv update for VM_BIND feature would require VM hold a reference to the i915_request through dma-resv fences of VM_PRIVATE objects (which share a per VM dma-resv object). Thus, we have a

Re: [PATCH v3 3/3] drm/doc: Add KUnit documentation

2022-06-14 Thread Javier Martinez Canillas
On 6/14/22 20:09, José Expósito wrote: > Hi Javier, > > On Tue, Jun 14, 2022 at 02:58:29PM +0200, Javier Martinez Canillas wrote: >> Hello José, >> >> On 6/13/22 19:17, José Expósito wrote: >> >> [snip] >> >>> +KUnit (Kernel unit testing framework) provides a common framework for unit >>> tests

Re: [PATCH v2 5/7] drm/bridge: anx7625: Register number of Type C switches

2022-06-14 Thread Prashant Malani
On Tue, Jun 14, 2022 at 1:22 AM AngeloGioacchino Del Regno wrote: > > Il 09/06/22 20:09, Prashant Malani ha scritto: > > Parse the "switches" node, if available, and count and store the number > > of Type-C switches within it. Since we currently don't do anything with > > this info, no functional

Re: [PATCH v3 3/3] drm/doc: Add KUnit documentation

2022-06-14 Thread José Expósito
Hi Javier, On Tue, Jun 14, 2022 at 02:58:29PM +0200, Javier Martinez Canillas wrote: > Hello José, > > On 6/13/22 19:17, José Expósito wrote: > > [snip] > > > +KUnit (Kernel unit testing framework) provides a common framework for unit > > tests > > +within the Linux kernel. > > + > > I think

Re: [PATCH] drm/amd/display: add stub for crtc_debugfs_init()

2022-06-14 Thread Randy Dunlap
On 6/14/22 10:45, Harry Wentland wrote: > On 2022-06-14 11:57, Randy Dunlap wrote: >> Fix build error when CONFIG_DEBUG_FS is not enabled by adding a >> stub function for crtc_debugfs_init(). >> >> Eliminates this build error: >> >>

Re: [PATCH] drm/amd/display: add stub for crtc_debugfs_init()

2022-06-14 Thread Harry Wentland
On 2022-06-14 11:57, Randy Dunlap wrote: > Fix build error when CONFIG_DEBUG_FS is not enabled by adding a > stub function for crtc_debugfs_init(). > > Eliminates this build error: > > ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function > ‘amdgpu_dm_crtc_late_register’:

Re: [PATCH v4, 0/3] add h264 decoder driver for mt8186

2022-06-14 Thread Nicolas Dufresne
Le lundi 13 juin 2022 à 16:10 -0400, Nicolas Dufresne a écrit : > Le jeudi 12 mai 2022 à 11:46 +0800, Yunfei Dong a écrit : > > Firstly, add mt8186 compatible and private data, then add document for > > compatible "mediatek,mt8186-vcodec-dec". For mt8186 is single core > > architecture, need to

Re: [PATCH 31/64] drm/vc4: dsi: Switch to drmm_of_get_bridge

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > The current code uses a device-managed function to retrieve the next bridge > downstream. > > However, that means that it will be removed at unbind time, where the DRM > device is still very much live and might still have some applications

Re: [PATCH 30/64] drm/vc4: dsi: Switch to DRM-managed encoder initialization

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > The current code will call drm_encoder_cleanup() when the device is > unbound. However, by then, there might still be some references held to > that encoder, including by the userspace that might still have the DRM > device open. > > Let's

Re: [Intel-gfx] [RFC v3 1/3] drm/doc/rfc: VM_BIND feature design document

2022-06-14 Thread Niranjana Vishwanathapura
On Tue, Jun 14, 2022 at 10:04:00AM +0300, Lionel Landwerlin wrote: On 13/06/2022 21:02, Niranjana Vishwanathapura wrote: On Mon, Jun 13, 2022 at 06:33:07AM -0700, Zeng, Oak wrote: Regards, Oak -Original Message- From: Intel-gfx On Behalf Of Niranjana Vishwanathapura Sent: June

Re: [PATCH 13/64] drm/vc4: hvs: Protect device resources after removal

2022-06-14 Thread Dave Stevenson
On Tue, 14 Jun 2022 at 16:11, Dave Stevenson wrote: > > Hi Maxime > > On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > > > Whenever the device and driver are unbound, the main device and all the > > subdevices will be removed by calling their unbind() method. > > > > However, the DRM

Re: [PATCH v2 7/7] drm/bridge: anx7625: Add typec_mux_set callback function

2022-06-14 Thread Prashant Malani
On Tue, Jun 14, 2022 at 2:08 AM Pin-yen Lin wrote: > > Hi AngeloGioacchino, > > > On Tue, Jun 14, 2022 at 4:15 PM AngeloGioacchino Del Regno > wrote: > > > > Il 09/06/22 20:09, Prashant Malani ha scritto: > > > From: Pin-Yen Lin > > > > > > Add the callback function when the driver receives

Re: [PATCH v2 6/7] drm/bridge: anx7625: Register Type-C mode switches

2022-06-14 Thread Prashant Malani
On Tue, Jun 14, 2022 at 1:18 AM AngeloGioacchino Del Regno wrote: > > Il 09/06/22 20:09, Prashant Malani ha scritto: > > When the DT node has "switches" available, register a Type-C mode-switch > > for each listed "switch". This allows the driver to receive state > > information about what

Re: [PATCH 28/64] drm/vc4: dpi: Protect device resources

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > Our current code now mixes some resources whose lifetime are tied to the > device (clocks, IO mappings, etc.) and some that are tied to the DRM device > (encoder, bridge). > > The device one will be freed at unbind time, but the DRM one will

Re: [PATCH 27/64] drm/vc4: dpi: Switch to drmm_of_get_bridge

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > The current code uses a device-managed function to retrieve the next bridge > downstream. > > However, that means that it will be removed at unbind time, where the DRM > device is still very much live and might still have some applications

Re: [PATCH 26/64] drm/vc4: dpi: Switch to DRM-managed encoder initialization

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > The current code will call drm_encoder_cleanup() when the device is > unbound. However, by then, there might still be some references held to > that encoder, including by the userspace that might still have the DRM > device open. > > Let's

Re: [PATCH 25/64] drm/vc4: dpi: Add action to disable the clock

2022-06-14 Thread Dave Stevenson
Hi Maxime. On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > Adding a device-managed action will make the error path easier, so let's > create one to disable our clock. The DPI block has two clocks (core and pixel), and this is only affecting one of them (the core clock). (I'm actually

Re: [Intel-gfx] [PATCH 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-14 Thread Niranjana Vishwanathapura
On Tue, Jun 14, 2022 at 05:07:37PM +0100, Tvrtko Ursulin wrote: On 14/06/2022 17:02, Tvrtko Ursulin wrote: On 14/06/2022 16:43, Niranjana Vishwanathapura wrote: On Tue, Jun 14, 2022 at 08:16:41AM +0100, Tvrtko Ursulin wrote: On 14/06/2022 00:39, Matthew Brost wrote: On Mon, Jun 13, 2022

Re: [PATCH 24/64] drm/vc4: dpi: Remove unnecessary drm_of_panel_bridge_remove call

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > Since we have a managed call to create our panel_bridge instance, the call > to drm_of_panel_bridge_remove() at unbind is both redundant and dangerous > since it might lead to a use-after-free. > > Signed-off-by: Maxime Ripard Reviewed-by:

Re: [PATCH] drm/msm/mdp4: Fix refcount leak in mdp4_modeset_init_intf

2022-06-14 Thread Abhinav Kumar
On 6/14/2022 3:09 AM, Dmitry Baryshkov wrote: On 14/06/2022 13:07, Miaoqian Lin wrote: Hi, Abhinav On 2022/6/11 7:20, Abhinav Kumar wrote: On 6/7/2022 4:08 AM, Miaoqian Lin wrote: of_graph_get_remote_node() returns remote device node pointer with refcount incremented, we should use

Re: [PATCH] drm/i915/guc: Check ctx while waiting for response

2022-06-14 Thread Dixit, Ashutosh
On Thu, 02 Jun 2022 10:21:19 -0700, Zhanjun Dong wrote: > Hi Zhanjun, > We are seeing error message of "No response for request". Some cases happened > while waiting for response and reset/suspend action was triggered. In this > case, no response is not an error, active requests will be

Re: [Intel-gfx] [PATCH] drm/i915/guc: Check ctx while waiting for response

2022-06-14 Thread Jani Nikula
On Thu, 02 Jun 2022, Zhanjun Dong wrote: > We are seeing error message of "No response for request". Some cases happened > while waiting for response and reset/suspend action was triggered. In this > case, no response is not an error, active requests will be cancelled. > > This patch will handle

Re: [PATCH 23/64] drm/vc4: dpi: Return an error if we can't enable our clock

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > If we fail to enable the DPI clock, we just ignore the error and moves > forward. Let's return an error instead. > > Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson > --- > drivers/gpu/drm/vc4/vc4_dpi.c | 5 - > 1 file

Re: [PATCH 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-14 Thread Niranjana Vishwanathapura
On Tue, Jun 14, 2022 at 09:27:05AM +0300, Lionel Landwerlin wrote: On 10/06/2022 11:53, Matthew Brost wrote: On Fri, Jun 10, 2022 at 12:07:11AM -0700, Niranjana Vishwanathapura wrote: VM_BIND and related uapi definitions Signed-off-by: Niranjana Vishwanathapura ---

Re: [PATCH 19/64] drm/vc4: crtc: Switch to DRM-managed CRTC initialization

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > The current code will call drm_crtc_cleanup() when the device is > unbound. However, by then, there might still be some references held to > that CRTC, including by the userspace that might still have the DRM > device open. > > Let's switch

Re: [PATCH 22/64] drm/vc4: dpi: Switch to drmm_kzalloc

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > Our internal structure that stores the DRM entities structure is allocated > through a device-managed kzalloc. > > This means that this will eventually be freed whenever the device is > removed. In our case, the most like source of removal is

Re: [Intel-gfx] [PATCH] drm/i915/guc: Check ctx while waiting for response

2022-06-14 Thread Michal Wajdeczko
On 02.06.2022 19:21, Zhanjun Dong wrote: > We are seeing error message of "No response for request". Some cases happened > while waiting for response and reset/suspend action was triggered. In this > case, no response is not an error, active requests will be cancelled. > > This patch will

Re: [Intel-gfx] [PATCH 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-14 Thread Tvrtko Ursulin
On 14/06/2022 17:02, Tvrtko Ursulin wrote: On 14/06/2022 16:43, Niranjana Vishwanathapura wrote: On Tue, Jun 14, 2022 at 08:16:41AM +0100, Tvrtko Ursulin wrote: On 14/06/2022 00:39, Matthew Brost wrote: On Mon, Jun 13, 2022 at 07:09:06PM +0100, Tvrtko Ursulin wrote: On 13/06/2022 18:49,

Re: [PATCH 21/64] drm/vc4: dpi: Embed DRM structures into the private structure

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > The VC4 DPI driver private structure contains only a pointer to the > encoder it implements. This makes the overall structure somewhat > inconsistent with the rest of the driver, and complicates its > initialisation without any apparent gain.

Re: [Intel-gfx] [PATCH 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-14 Thread Tvrtko Ursulin
On 14/06/2022 16:43, Niranjana Vishwanathapura wrote: On Tue, Jun 14, 2022 at 08:16:41AM +0100, Tvrtko Ursulin wrote: On 14/06/2022 00:39, Matthew Brost wrote: On Mon, Jun 13, 2022 at 07:09:06PM +0100, Tvrtko Ursulin wrote: On 13/06/2022 18:49, Niranjana Vishwanathapura wrote: On Mon,

Re: [PATCH 20/64] drm/vc4: dpi: Remove vc4_dev dpi pointer

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > There's no user for that pointer so let's just get rid of it. > > Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson > --- > drivers/gpu/drm/vc4/vc4_dpi.c | 7 --- > drivers/gpu/drm/vc4/vc4_drv.h | 1 - > 2 files changed, 8

Re: [PATCH 17/64] drm/vc4: crtc: Move debugfs_name to crtc_data

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > All the CRTCs, including the TXP, have a debugfs file and name so we can > consolidate it into vc4_crtc_data. > > Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson I was sort of expecting the vc4_debugfs_add_regset32 call to move

[PATCH] drm/amd/display: add stub for crtc_debugfs_init()

2022-06-14 Thread Randy Dunlap
Fix build error when CONFIG_DEBUG_FS is not enabled by adding a stub function for crtc_debugfs_init(). Eliminates this build error: ../drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function ‘amdgpu_dm_crtc_late_register’:

Re: [PATCH] drm/sun4i: dw-hdmi: Fix ddc-en GPIO consumer conflict

2022-06-14 Thread Jernej Škrabec
Dne torek, 14. junij 2022 ob 09:31:00 CEST je Samuel Holland napisal(a): > commit 6de79dd3a920 ("drm/bridge: display-connector: add ddc-en gpio > support") added a consumer for this GPIO in the HDMI connector device. > This new consumer conflicts with the pre-existing GPIO consumer in the > sun8i

Re: [Intel-gfx] [PATCH 3/3] drm/doc/rfc: VM_BIND uapi definition

2022-06-14 Thread Niranjana Vishwanathapura
On Tue, Jun 14, 2022 at 08:16:41AM +0100, Tvrtko Ursulin wrote: On 14/06/2022 00:39, Matthew Brost wrote: On Mon, Jun 13, 2022 at 07:09:06PM +0100, Tvrtko Ursulin wrote: On 13/06/2022 18:49, Niranjana Vishwanathapura wrote: On Mon, Jun 13, 2022 at 05:22:02PM +0100, Tvrtko Ursulin wrote:

Re: [PATCH 18/64] drm/vc4: crtc: Switch to drmm_kzalloc

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > Our internal structure that stores the DRM entities structure is allocated > through a device-managed kzalloc. > > This means that this will eventually be freed whenever the device is > removed. In our case, the most like source of removal is

Re: [PATCH 16/64] drm/vc4: plane: Switch to drmm_universal_plane_alloc()

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > Let's switch to drmm_universal_plane_alloc() for our plane allocation and > initialisation to make the driver a bit simpler. > > Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson > --- > drivers/gpu/drm/vc4/vc4_crtc.c | 12

Re: [PATCH] drm/msm: Make msm_gem_free_object() static

2022-06-14 Thread Dmitry Baryshkov
On Mon, 13 Jun 2022 at 23:49, Rob Clark wrote: > > From: Rob Clark > > Misc small cleanup I noticed. Not called from another object file since > 3c9edd9c85f5 ("drm/msm: Introduce GEM object funcs") > > Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov > --- >

Re: [Intel-gfx] [PATCH] drm/i915/guc: Check ctx while waiting for response

2022-06-14 Thread Teres Alexis, Alan Previn
Can't see anything wrong with this. I consider this only a NIT, so feel : not sure if -ECANCELLED is reflective of the "ct service being temporarily down" as opposed to the "requester cancelling". Perhaps a -EPIPE or -EAGAIN (if we got this far, we know we are probably mid- reset) ?? (if not

Re: [PATCH v5] drm/msm/dp: force link training for display resolution change

2022-06-14 Thread Kuogee Hsieh
On 6/14/2022 1:38 AM, Stephen Boyd wrote: Quoting Kuogee Hsieh (2022-06-13 14:48:37) During display resolution changes display have to be disabled first followed by display enabling with new resolution. Display disable will turn off both pixel clock and main link clock so that main link have

Re: [PATCH 15/64] drm/vc4: plane: Take possible_crtcs as an argument

2022-06-14 Thread Dave Stevenson
On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > vc4_plane_init() currently initialises the plane with no possible CRTCs, > and will expect the caller to set it up by itself. > > Let's change that logic a bit to follow the syntax of > drm_universal_plane_init() and pass the possible CRTCs

Re: [PATCH 13/64] drm/vc4: hvs: Protect device resources after removal

2022-06-14 Thread Dave Stevenson
Hi Maxime On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > Whenever the device and driver are unbound, the main device and all the > subdevices will be removed by calling their unbind() method. > > However, the DRM device itself will only be freed when the last user will > have closed it.

Re: [Intel-gfx] [PATCH v7] drm/i915/display: disable HPD workers before display driver unregister

2022-06-14 Thread Andrzej Hajda
On 10.06.2022 20:37, Ville Syrjälä wrote: On Fri, Jun 10, 2022 at 06:00:24PM +0200, Andrzej Hajda wrote: Handling HPD during driver removal is pointless, and can cause different use-after-free/concurrency issues: 1. Setup of deferred fbdev after fbdev unregistration. 2. Access to DP-AUX after

  1   2   >