Re: [PATCH v5 3/3] xen: add helpers to allocate unpopulated memory

2020-09-04 Thread Roger Pau Monné
On Fri, Sep 04, 2020 at 09:00:18AM +0200, Jürgen Groß wrote: > On 03.09.20 18:38, Roger Pau Monné wrote: > > On Thu, Sep 03, 2020 at 05:30:07PM +0200, Jürgen Groß wrote: > > > On 01.09.20 10:33, Roger Pau Monne wrote: > > > > To be used in order to create foreign mappings. This is based on the > >

[PATCH v5 34/80] drm/vc4: crtc: Move the CRTC disable out

2020-09-04 Thread Maxime Ripard
We'll need to reuse the part that disables the HVS and PixelValve during boot too, so let's create a separate function. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 34

[PATCH v5 65/80] drm/vc4: hdmi: Use reg-names to retrieve the HDMI audio registers

2020-09-04 Thread Maxime Ripard
From: Dave Stevenson The register range used for audio setup in the previous generations of SoC were always the second range in the device tree. However, now that the BCM2711 has way more register ranges, it makes sense to retrieve it by names for it, while preserving the id-based lookup as a

[PATCH v5 30/80] drm/vc4: crtc: Clear the PixelValve FIFO on disable

2020-09-04 Thread Maxime Ripard
In order to avoid a stale pixel getting stuck on mode change or a disable / enable cycle, we need to make sure to flush the PV FIFO on disable. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard ---

[PATCH v5 78/80] dt-bindings: display: vc4: Document BCM2711 VC5

2020-09-04 Thread Maxime Ripard
The BCM2711 comes with a new VideoCore. Add a compatible for it. Reviewed-by: Rob Herring Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/display/brcm,bcm2835-vc4.yaml | 1 +

[PATCH v5 24/80] drm/vc4: hvs: Make sure our channel is reset

2020-09-04 Thread Maxime Ripard
In order to clear our intermediate FIFOs that might end up with a stale pixel, let's make sure our FIFO channel is reset every time our channel is setup. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard ---

[PATCH v2] drm/bridge: add it6505 driver

2020-09-04 Thread allen
This adds support for the iTE IT6505. This device can convert DPI signal to DP output. From: Allen Chen Signed-off-by: Jitao Shi Signed-off-by: Pi-Hsun Shih Signed-off-by: Yilun Lin Signed-off-by: Hermes Wu Signed-off-by: Allen Chen --- drivers/gpu/drm/bridge/Kconfig |7 +

[PATCH v5 28/80] drm/vc4: encoder: Add finer-grained encoder callbacks

2020-09-04 Thread Maxime Ripard
In the BCM2711, the setup of the HVS, pixelvalve and HDMI controller requires very precise ordering and timing that the regular atomic callbacks don't provide. Let's add new callbacks on top of the regular ones to be able to split the configuration as needed. Reviewed-by: Dave Stevenson

[PATCH v5 80/80] ARM: dts: bcm2711: Enable the display pipeline

2020-09-04 Thread Maxime Ripard
Now that all the drivers have been adjusted for it, let's bring in the necessary device tree changes. The VEC and PV3 are left out for now, since it will require a more specific clock setup. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren

Re: [PATCH v10 07/17] pwm: lpss: Remove suspend/resume handlers

2020-09-04 Thread Andy Shevchenko
On Thu, Sep 03, 2020 at 01:23:27PM +0200, Hans de Goede wrote: > PWM controller drivers should not restore the PWM state on resume. The > convention is that PWM consumers do this by calling pwm_apply_state(), > so that it can be done at the exact moment when the consumer needs > the state to be

[PATCH v5 43/80] drm/vc4: hdmi: Move accessors to vc4_hdmi

2020-09-04 Thread Maxime Ripard
The current driver only supports a single HDMI controller, and part of the issue is that the main vc4_dev structure holds a pointer to its (only) HDMI controller, and the HDMI registers accessors will use it to retrieve the mapped addresses. Let's modify those accessors to use directly the

[PATCH v5 79/80] drm/vc4: drv: Support BCM2711

2020-09-04 Thread Maxime Ripard
The BCM2711 has a reworked display pipeline, and the load tracker needs some adjustment to operate properly. Let's add a compatible for BCM2711 and disable the load tracker until properly supported. Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime

Re: [PATCH 0/8] Convert the intel iommu driver to the dma-iommu api

2020-09-04 Thread Tom Murphy
On Fri, 28 Aug 2020 at 00:34, Tom Murphy wrote: > > On Thu, 27 Aug 2020 at 22:36, Logan Gunthorpe wrote: > > > > > > > > On 2020-08-23 6:04 p.m., Tom Murphy wrote: > > > I have added a check for the sg_dma_len == 0 : > > > """ > > > } __sgt_iter(struct scatterlist *sgl, bool dma) { > > >

[PATCH v3] drm/bridge: add it6505 driver

2020-09-04 Thread allen
This adds support for the iTE IT6505. This device can convert DPI signal to DP output. From: Allen Chen Signed-off-by: Jitao Shi Signed-off-by: Pi-Hsun Shih Signed-off-by: Yilun Lin Signed-off-by: Hermes Wu Signed-off-by: Allen Chen Reported-by: kernel test robot ---

[PATCH v5 69/80] drm/vc4: hdmi: Deal with multiple ALSA cards

2020-09-04 Thread Maxime Ripard
The HDMI driver was registering a single ALSA card so far with the name vc4-hdmi. Obviously, this is not going to work anymore when we will have multiple HDMI controllers since we will end up trying to register two files with the same name. Let's use the variant to avoid that name conflict.

[PATCH v5 57/80] drm/vc4: hdmi: Store the encoder type in the variant structure

2020-09-04 Thread Maxime Ripard
The vc4 CRTC will use the encoder type to control its output clock muxing. However, this will be different from HDMI0 to HDMI1, so let's store our type in the variant structure so that we can support multiple controllers later on. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by:

[PATCH v5 66/80] drm/vc4: hdmi: Reset audio infoframe on encoder_enable if previously streaming

2020-09-04 Thread Maxime Ripard
From: Dave Stevenson If the encoder is disabled and re-enabled (eg mode change) all infoframes are reset, whilst the audio subsystem know nothing about this change. The driver therefore needs to reinstate the audio infoframe for itself. Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon

[PATCH] drm/bridge: add it6505 driver

2020-09-04 Thread allen
This adds support for the iTE IT6505. This device can convert DPI signal to DP output. From: Allen Chen Signed-off-by: Jitao Shi Signed-off-by: Pi-Hsun Shih Signed-off-by: Yilun Lin Signed-off-by: Hermes Wu Signed-off-by: Allen Chen --- drivers/gpu/drm/bridge/Kconfig |7 +

[PATCH 2/3] drm/v3d: Correctly restart the timer when progress is made

2020-09-04 Thread Yukimasa Sugizaki
From: Yukimasa Sugizaki The V3D scheduler wants a timed-out job to continue running if it made progress. However, the current DRM scheduler removes the timed-out job from ring_mirror_list and thus the timer is not restarted automatically, resulting in an infinite timeout. We need stop and

[PATCH v5 58/80] drm/vc4: hdmi: Deal with multiple debugfs files

2020-09-04 Thread Maxime Ripard
The HDMI driver was registering a single debugfs file so far with the name hdmi_regs. Obviously, this is not going to work anymore when will have multiple HDMI controllers since we will end up trying to register two files with the same name. Let's use the variant to avoid that name conflict.

[PATCH v5 73/80] drm/vc4: hdmi: Do the VID_CTL configuration at once

2020-09-04 Thread Maxime Ripard
The VID_CTL setup is done in several places in the driver even though it's not really required. Let's simplify it a bit to do the configuration in one go. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard ---

[PATCH v5 18/80] drm/vc4: crtc: Add HDMI1 encoder type

2020-09-04 Thread Maxime Ripard
The BCM2711 sports a second HDMI controller, so let's add that second HDMI encoder type. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_drv.h | 1 + 1 file changed, 1 insertion(+)

[PATCH v5 41/80] drm/vc4: hdmi: Remove DDC argument to connector_init

2020-09-04 Thread Maxime Ripard
Now that we are passing the vc4_hdmi structure to the connector init function, we can simply use the pointer in that structure instead of having the pointer as an argument. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime

[PATCH v5 16/80] drm/vc4: crtc: Add function to compute FIFO level bits

2020-09-04 Thread Maxime Ripard
The longer FIFOs in vc5 pixelvalves means that the FIFO full level doesn't fit in the original register field and that we also have a secondary field. In order to prepare for this, let's move the registers fill part to a helper function. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi

[PATCH v5 52/80] drm/vc4: hdmi: Add reset callback

2020-09-04 Thread Maxime Ripard
The BCM2711 and BCM283x HDMI controllers use a slightly different reset sequence, so let's add a callback to reset the controller. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard ---

[PATCH 0/3] drm/v3d: CL/CSD job timeout fixes

2020-09-04 Thread Yukimasa Sugizaki
From: Yukimasa Sugizaki Hi, The current V3D scheduler has two issues where CSD jobs are resubmitted regardless of the previous timed-out flag, and where the timer is not restarted for timed-out CL/CSD jobs (which we wish to continue running). The second one is due to the DRM scheduler API

[PATCH v5 56/80] drm/vc4: hdmi: Add a set_timings callback

2020-09-04 Thread Maxime Ripard
Similarly to the previous patches, the timings setup in the HDMI controller of the BCM2711 is slightly different, mostly because it supports higher resolutions and thus needed more spaces for the various timings, resulting in the register layout changing. Let's add a callback for that as well.

[PATCH v5 70/80] drm/vc4: hdmi: Remove register dumps in enable

2020-09-04 Thread Maxime Ripard
The current code has some logic, disabled by default, to dump the register setup in the HDMI controller. However, since we're going to split those functions in multiple, shorter, functions that only make sense where they are called in sequence, keeping the register dump makes little sense.

[PATCH v5 27/80] drm/vc4: crtc: Move HVS channel init before the PV initialisation

2020-09-04 Thread Maxime Ripard
In order to avoid stale pixels getting stuck in an intermediate FIFO between the HVS and the pixelvalve on BCM2711, we need to configure the HVS channel before the pixelvalve is reset and configured. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan

[PATCH v5 60/80] drm/vc4: hdmi: Add CEC support flag

2020-09-04 Thread Maxime Ripard
Similarly to the audio support, CEC support is not there yet for the BCM2711, so let's skip entirely the CEC initialization through a variant flag. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard ---

[PATCH v5 64/80] drm/vc4: hdmi: Use clk_set_min_rate instead

2020-09-04 Thread Maxime Ripard
The HSM clock needs to be running at 101% the pixel clock of the HDMI controller, however it's shared between the two HDMI controllers, which means that if the resolutions are different between the two HDMI controllers, and the lowest resolution is on the second (in enable order) controller, the

Re: [PATCH v10 06/17] pwm: lpss: Make pwm_lpss_apply() not rely on existing hardware state

2020-09-04 Thread Andy Shevchenko
On Thu, Sep 03, 2020 at 01:23:26PM +0200, Hans de Goede wrote: > Before this commit pwm_lpss_apply() was assuming 2 pre-conditions > were met by the existing hardware state: > > 1. That the base-unit and on-time-div read back from the > control register are those actually in use, so that it > can

[PATCH v5 67/80] drm/vc4: hdmi: Set the b-frame marker to the match ALSA's default.

2020-09-04 Thread Maxime Ripard
From: Dave Stevenson ALSA's iec958 plugin by default sets the block start preamble to 8, whilst this driver was programming the hardware to expect 0xF. Amend the hardware config to match ALSA. Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Dave

[PATCH v5 32/80] drm/vc4: hvs: Make the stop_channel function public

2020-09-04 Thread Maxime Ripard
During the transition from the firmware to the KMS driver, we need to pay particular attention to how we deal with the pixelvalves that have already been enabled, otherwise either timeouts or stuck pixels can occur. We'll thus need to call the function to stop an HVS channel at boot. Reviewed-by:

[PATCH 3/3] drm/v3d: Add job timeout module param

2020-09-04 Thread Yukimasa Sugizaki
From: Yukimasa Sugizaki The default timeout is 500 ms which is too short for some workloads including Piglit. Adding this parameter will help users to run heavier tasks. Signed-off-by: Yukimasa Sugizaki --- drivers/gpu/drm/v3d/v3d_sched.c | 24 +--- 1 file changed, 13

[PATCH v5 42/80] drm/vc4: hdmi: Rename hdmi to vc4_hdmi

2020-09-04 Thread Maxime Ripard
The driver isn't consistent with the name given to the vc4_hdmi structure pointer in its functions. Make sure to use a consistent name. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard ---

[PATCH] drm: xlnx: fix build warning & errors when DMADEVICES is not set

2020-09-04 Thread Randy Dunlap
From: Randy Dunlap Fix kconfig warnings & build errors caused by DRM_ZYNQMP_DPSUB. Any driver that selects DMA_ENGINE should make sure that DMADEVICES is already enabled. As is, this causes build errors in many other drivers. See

[PATCH v5 48/80] drm/vc4: hdmi: Remove vc4_dev hdmi pointer

2020-09-04 Thread Maxime Ripard
Now that we don't have any users anymore, we can kill that pointer. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_drv.h | 1 - drivers/gpu/drm/vc4/vc4_hdmi.c | 7 --- 2 files

[PATCH v5 22/80] drm/vc4: crtc: Move HVS init and close to a function

2020-09-04 Thread Maxime Ripard
In order to make further refactoring easier, let's move the HVS channel setup / teardown to their own function. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hvs.c | 104

[PATCH v5 02/80] drm/vc4: Add support for the BCM2711 HVS5

2020-09-04 Thread Maxime Ripard
From: Dave Stevenson The HVS found in the BCM2711 is slightly different from the previous generations. Most notably, the display list layout changes a bit, the LBM doesn't have the same size and the formats ordering for some formats is swapped. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi

[PATCH v5 53/80] drm/vc4: hdmi: Add PHY init and disable function

2020-09-04 Thread Maxime Ripard
The HDMI PHY in the BCM2711 HDMI controller is significantly more complicated to setup than in the older BCM283x SoCs. Let's add hooks to enable and disable the PHY. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime

[PATCH v5 29/80] drm/vc4: crtc: Add a delay after disabling the PixelValve output

2020-09-04 Thread Maxime Ripard
In order to avoid pixels getting stuck in the (unflushable) FIFO between the HVS and the PV, we need to add some delay after disabling the PV output and before disabling the HDMI controller. 20ms seems to be good enough so let's use that. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi

[PATCH v5 50/80] drm/vc4: hdmi: Introduce resource init and variant

2020-09-04 Thread Maxime Ripard
The HDMI controllers found in the BCM2711 has a pretty different clock and registers areas than found in the older BCM283x SoCs. Let's create a variant structure to store the various adjustments we'll need later on, and a function to get the resources needed for one particular version.

[PATCH 1/3] drm/v3d: Don't resubmit guilty CSD jobs

2020-09-04 Thread Yukimasa Sugizaki
From: Yukimasa Sugizaki The previous code misses a check for the timeout error set by drm_sched_resubmit_jobs(), which results in an infinite GPU reset loop if once a timeout occurs: [ 178.799106] v3d fec0.v3d: [drm:v3d_reset [v3d]] *ERROR* Resetting GPU for hang. [ 178.807836] v3d

[PATCH v5 26/80] drm/vc4: crtc: Remove redundant pixelvalve reset

2020-09-04 Thread Maxime Ripard
Since we moved the pixelvalve configuration to atomic_enable, we're now first calling the function that resets the pixelvalve and then the one that configures it. However, the first thing the latter is doing is calling the reset function, meaning that we reset twice our pixelvalve. Let's remove

[PATCH v5 51/80] drm/vc4: hdmi: Implement a register layout abstraction

2020-09-04 Thread Maxime Ripard
The HDMI controllers found in the BCM2711 have most of the registers reorganized in multiple registers areas and at different offsets than previously found. The logic however remains pretty much the same, so it doesn't really make sense to create a whole new driver and we should share the code as

[PATCH v5 47/80] drm/vc4: hdmi: Retrieve the vc4_hdmi at unbind using our device

2020-09-04 Thread Maxime Ripard
The unbind function needs to retrieve a vc4_hdmi structure pointer through the struct device that we're given since we want to support multiple HDMI controllers. However, our optional ASoC support doesn't make that trivial since it will overwrite the device drvdata if we use it, but obviously

[PATCH v5 13/80] drm/vc4: kms: Convert to for_each_new_crtc_state

2020-09-04 Thread Maxime Ripard
The vc4 atomic commit loop has an handrolled loop that is basically identical to for_each_new_crtc_state, let's convert it to that helper. Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 10 ++

[PATCH v5 38/80] drm/vc4: hdmi: Use debugfs private field

2020-09-04 Thread Maxime Ripard
We're calling vc4_debugfs_add_file with our struct vc4_hdmi pointer set in the private field, but we don't use that field and go through the main struct vc4_dev to get it. Let's use the private field directly, that will save us some trouble later on. Reviewed-by: Eric Anholt Tested-by: Chanwoo

[PATCH v5 21/80] drm/vc4: crtc: Move PV dump to config_pv

2020-09-04 Thread Maxime Ripard
Now that we only configure the PixelValve in vc4_crtc_config_pv, it doesn't really make much sense to dump its register content in its caller. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard ---

[PATCH v5 25/80] drm/vc4: crtc: Remove mode_set_nofb

2020-09-04 Thread Maxime Ripard
On BCM2711 to avoid stale pixels getting stuck in intermediate FIFOs, the pixelvalve needs to be setup each time there's a mode change or enable / disable sequence. Therefore, we can't really use mode_set_nofb anymore to configure it, but we need to move it to atomic_enable. Reviewed-by: Dave

[PATCH v5 71/80] drm/vc4: hdmi: Always recenter the HDMI FIFO

2020-09-04 Thread Maxime Ripard
In order to avoid a pixel getting stuck in an unflushable FIFO, we need to recenter the FIFO every time we're doing a modeset and not only if we're connected to an HDMI monitor. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by:

[PATCH v5 59/80] drm/vc4: hdmi: Move CEC init to its own function

2020-09-04 Thread Maxime Ripard
The CEC init code was put directly into the bind function, which was quite inconsistent with how the audio support was done, and would prevent us from further changes to skip that initialisation entirely. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by:

Re: [PATCH v10 07/17] pwm: lpss: Remove suspend/resume handlers

2020-09-04 Thread Andy Shevchenko
On Thu, Sep 03, 2020 at 03:48:16PM +0300, Andy Shevchenko wrote: > On Thu, Sep 03, 2020 at 01:23:27PM +0200, Hans de Goede wrote: > the question is do we need to have similar in acpi_lpss.c? > For example, > static const struct lpss_device_desc byt_pwm_dev_desc = { > .flags =

[PATCH v5 20/80] drm/vc4: crtc: Turn pixelvalve reset into a function

2020-09-04 Thread Maxime Ripard
The driver resets the pixelvalve FIFO in a number of occurences without always using the same sequence. Since this will be critical for BCM2711, let's move that sequence to a function so that we are consistent. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon

[PATCH v5 68/80] drm/vc4: hdmi: Add audio-related callbacks

2020-09-04 Thread Maxime Ripard
From: Dave Stevenson The audio configuration has changed for the BCM2711, with notably a different parent clock and a different channel configuration. Make that modular to be able to support the BCM2711. Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by:

[PATCH v5 46/80] drm/vc4: hdmi: Pass vc4_hdmi to CEC code

2020-09-04 Thread Maxime Ripard
Our CEC code also retrieves the associated vc4_hdmi by setting the vc4_dev pointer as its private data, and then dereferences its vc4_hdmi pointer. In order to eventually get rid of that pointer, we can simply pass the vc4_hdmi pointer directly. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi

[PATCH v5 44/80] drm/vc4: hdmi: Use local vc4_hdmi directly

2020-09-04 Thread Maxime Ripard
The function vc4_hdmi_connector_detect access its vc4_hdmi struct by dereferencing the pointer in the structure vc4_dev. This will cause some issues when we will have multiple HDMI controllers, so let's just use the local variable for now instead of dereferencing that pointer all the time, and

[PATCH v5 31/80] drm/vc4: crtc: Clear the PixelValve FIFO during configuration

2020-09-04 Thread Maxime Ripard
Even though it's not really clear why we need to flush the PV FIFO during the configuration even though we started by flushing it, experience shows that without it we get a stale pixel stuck in the FIFO between the HVS and the PV. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by:

[PATCH v5 00/80] drm/vc4: Support BCM2711 Display Pipeline

2020-09-04 Thread Maxime Ripard
Hi everyone, Here's a (pretty long) series to introduce support in the VC4 DRM driver for the display pipeline found in the BCM2711 (and thus the RaspberryPi 4). The main differences are that there's two HDMI controllers and that there's more pixelvalve now. Those pixelvalve come with a mux in

[PATCH v5 36/80] dt-bindings: display: vc4: pv: Add BCM2711 pixel valves

2020-09-04 Thread Maxime Ripard
The BCM2711 comes with other pixelvalves that have different requirements and capabilities. Let's document their compatible. Reviewed-by: Rob Herring Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard ---

[PATCH v5 14/80] drm/vc4: crtc: Assign output to channel automatically

2020-09-04 Thread Maxime Ripard
The HVS found in the BCM2711 has 6 outputs and 3 FIFOs, with each output being connected to a pixelvalve, and some muxing between the FIFOs and outputs. Any output cannot feed from any FIFO though, and they all have a bunch of constraints. In order to support this, let's store the possible FIFOs

[PATCH v5 63/80] drm/vc4: hdmi: Adjust HSM clock rate depending on pixel rate

2020-09-04 Thread Maxime Ripard
The HSM clock needs to be setup at around 101% of the pixel rate. This was done previously by setting the clock rate to 163.7MHz at probe time and only check in mode_valid whether the mode pixel clock was under the pixel clock +1% or not. However, with 4k we need to change that frequency to a

[PATCH v5 05/80] drm/vc4: plane: Optimize the LBM allocation size

2020-09-04 Thread Maxime Ripard
From: Dave Stevenson The current code is using the maximum of the source line size and the destination line size to compute the size of the LBM to allocate. While this is simpler, it starts to be an issue with modes such as 4k with a quite long that will consume all the available memory, so we

[PATCH v5 17/80] drm/vc4: crtc: Rename HDMI encoder type to HDMI0

2020-09-04 Thread Maxime Ripard
The previous generations were only supporting a single HDMI controller, but that's about to change, so put an index as well to differentiate between the two controllers. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime

[PATCH v5 76/80] drm/vc4: hdmi: Support the BCM2711 HDMI controllers

2020-09-04 Thread Maxime Ripard
Now that the driver is ready for it, let's bring in the HDMI controllers variants for the BCM2711. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 284

[PATCH v5 23/80] drm/vc4: crtc: Move the HVS gamma LUT setup to our init function

2020-09-04 Thread Maxime Ripard
Since most of the HVS channel is setup in the init function, let's move the gamma setup there too. As this makes the HVS mode_set function empty, let's remove it in the process. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by:

[PATCH v5 07/80] drm/vc4: crtc: Deal with different number of pixel per clock

2020-09-04 Thread Maxime Ripard
Some of the HDMI pixelvalves in vc5 output two pixels per clock cycle. Let's put the number of pixel output per clock cycle in the CRTC data and update the various calculations to reflect that. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren

[PATCH v5 72/80] drm/vc4: hdmi: Implement finer-grained hooks

2020-09-04 Thread Maxime Ripard
In order to prevent some pixels getting stuck in an unflushable FIFO on bcm2711, we need to enable the HVS, the pixelvalve (the CRTC) and the HDMI controller (the encoder) in an intertwined way, and with tight delays. However, the atomic callbacks don't really provide a way to work with either

[PATCH v5 03/80] drm/vc4: hvs: Boost the core clock during modeset

2020-09-04 Thread Maxime Ripard
In order to prevent timeouts and stalls in the pipeline, the core clock needs to be maxed at 500MHz during a modeset on the BCM2711. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard ---

[PATCH v5 06/80] drm/vc4: plane: Create more planes

2020-09-04 Thread Maxime Ripard
Let's now create more planes that can be affected to all the CRTCs. vc4 has 3 CRTCs, 1 primary and 1 cursor each, and was having 24 (8 planes per CRTC) overlays. However, vc5 has 5 CRTCs, so keeping the same logic would put us at 50 planes which is well above the 32 planes limit imposed by DRM.

[PATCH v5 09/80] drm/vc4: crtc: Move the cob allocation outside of bind

2020-09-04 Thread Maxime Ripard
The COB allocation depends on the HVS channel used for a given pixelvalve. While the channel allocation was entirely static in vc4, vc5 changes that and at bind time, a pixelvalve can be assigned to multiple HVS channels. Let's prepare that rework by allocating the COB when it's actually needed.

[PATCH v5 04/80] drm/vc4: plane: Change LBM alignment constraint on LBM

2020-09-04 Thread Maxime Ripard
From: Dave Stevenson The HVS5 needs an alignment of 64bytes for its LBM memory, so let's reflect it. Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_plane.c | 4 +++- 1 file

[PATCH v5 11/80] drm/vc4: crtc: Use local chan variable

2020-09-04 Thread Maxime Ripard
The vc4_crtc_handle_page_flip already has a local variable holding the value of vc4_crtc->channel, so let's use it instead. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c |

[PATCH v5 12/80] drm/vc4: crtc: Enable and disable the PV in atomic_enable / disable

2020-09-04 Thread Maxime Ripard
The VIDEN bit in the pixelvalve currently being used to enable or disable the pixelvalve seems to not be enough in some situations, which whill end up with the pixelvalve stalling. In such a case, even re-enabling VIDEN doesn't bring it back and we need to clear the FIFO. This can only be done if

[PATCH v5 40/80] drm/vc4: hdmi: rework connectors and encoders

2020-09-04 Thread Maxime Ripard
the vc4_hdmi driver has some custom structures to hold the data it needs to associate with the drm_encoder and drm_connector structures. However, it allocates them separately from the vc4_hdmi structure which makes it more complicated than it needs to be. Move those structures to be contained by

[PATCH v5 10/80] drm/vc4: crtc: Rename HVS channel to output

2020-09-04 Thread Maxime Ripard
In vc5, the HVS has 6 outputs and 3 FIFOs (or channels), with pixelvalves each being assigned to a given output, but each output can then be muxed to feed from multiple FIFOs. Since vc4 had that entirely static, both were probably equivalent, but since that changes, let's rename hvs_channel to

[PATCH v5 75/80] drm/vc4: hdmi: Add pixel BVB clock control

2020-09-04 Thread Maxime Ripard
From: Hoegeun Kwon The BCM2711 has another clock that needs to be ramped up depending on the pixel rate: the pixel BVB clock. Add the code to adjust that clock when changing the mode. Signed-off-by: Hoegeun Kwon [Maxime: Changed the commit log, used clk_set_min_rate] Signed-off-by: Maxime

[PATCH v5 61/80] drm/vc4: hdmi: Remove unused CEC_CLOCK_DIV define

2020-09-04 Thread Maxime Ripard
The CEC_CLOCK_DIV define is not used anywhere in the driver, let's remove it. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [PATCH v5 0/7] make hdmi work on bananapi-r2

2020-09-04 Thread Frank Wunderlich
Hi Any opinion about DTS Patches? Which maintainer will include it in tree? Is any ack/review needed? regards Frank ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH v5 37/80] drm/vc4: crtc: Add BCM2711 pixelvalves

2020-09-04 Thread Maxime Ripard
The BCM2711 has 5 pixelvalves, so now that our driver is ready, let's add support for them. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 95

[PATCH v5 77/80] dt-bindings: display: vc4: hdmi: Add BCM2711 HDMI controllers bindings

2020-09-04 Thread Maxime Ripard
The HDMI controllers found in the BCM2711 SoC need some adjustments to the bindings, especially since the registers have been shuffled around in more register ranges. Reviewed-by: Rob Herring Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard

[PATCH v5 49/80] drm/vc4: hdmi: Remove vc4_hdmi_connector

2020-09-04 Thread Maxime Ripard
The vc4_hdmi_connector was only used to switch between drm_connector to drm_encoder. However, we can now use vc4_hdmi to do the switch, so that structure is redundant. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime

[PATCH v5 01/80] dt-bindings: display: Add support for the BCM2711 HVS

2020-09-04 Thread Maxime Ripard
The HVS found in the BCM2711 is slightly different from the previous generations, let's add a compatible for it. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard ---

[PATCH v5 15/80] drm/vc4: crtc: Add FIFO depth to vc4_crtc_data

2020-09-04 Thread Maxime Ripard
Not all pixelvalve FIFOs in vc5 have the same depth, so we need to add that to our vc4_crtc_data structure to be able to compute the fill level properly later on. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard

[PATCH v5 62/80] drm/vc4: hdmi: Rename drm_encoder pointer in mode_valid

2020-09-04 Thread Maxime Ripard
The mode_valid hook on the encoder uses a pointer to a drm_encoder called crtc, which is pretty confusing. Let's rename it to encoder to make it clear what it is. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard

[PATCH v5 33/80] drm/vc4: hvs: Introduce a function to get the assigned FIFO

2020-09-04 Thread Maxime Ripard
At boot time, if we detect that a pixelvalve has been enabled, we need to be able to retrieve the HVS channel it has been assigned to so that we can disable that channel too. Let's create that function that returns the FIFO or an error from a given output. Reviewed-by: Eric Anholt Tested-by:

[PATCH v5 35/80] drm/vc4: drv: Disable the CRTC at boot time

2020-09-04 Thread Maxime Ripard
In order to prevent issues during the firmware to KMS transition, we need to make sure the pixelvalve are disabled at boot time so that the DRM state matches the hardware state. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by:

[PATCH v5 55/80] drm/vc4: hdmi: Add a CSC setup callback

2020-09-04 Thread Maxime Ripard
Similarly to the previous patches, the CSC setup is slightly different in the BCM2711 than in the previous generations. Let's add a callback for it. Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 70

Re: [PATCH v5 3/3] xen: add helpers to allocate unpopulated memory

2020-09-04 Thread Jürgen Groß
On 03.09.20 18:38, Roger Pau Monné wrote: On Thu, Sep 03, 2020 at 05:30:07PM +0200, Jürgen Groß wrote: On 01.09.20 10:33, Roger Pau Monne wrote: To be used in order to create foreign mappings. This is based on the ZONE_DEVICE facility which is used by persistent memory devices in order to

[PATCH v5 39/80] drm/vc4: hdmi: Move structure to header

2020-09-04 Thread Maxime Ripard
We will need to share the vc4_hdmi and related structures with multiple files, so let's create a header for it. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 76

[PATCH v5 08/80] drm/vc4: crtc: Use a shared interrupt

2020-09-04 Thread Maxime Ripard
Some pixelvalves in vc5 use the same interrupt line so let's register our interrupt handler as a shared one. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 4 +++- 1 file

RE: [PATCH v9 2/3] drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge

2020-09-04 Thread Milind Parab
Hi Tomi, >-Original Message- >From: Tomi Valkeinen >Sent: Thursday, September 3, 2020 12:54 PM >To: Milind Parab ; Swapnil Kashinath Jakhade >; airl...@linux.ie; dan...@ffwll.ch; >laurent.pinch...@ideasonboard.com; robh...@kernel.org; >a.ha...@samsung.com; narmstr...@baylibre.com;

[PATCH v5 74/80] drm/vc4: hdmi: Switch to blank pixels when disabled

2020-09-04 Thread Maxime Ripard
In order to avoid pixels getting stuck in an unflushable FIFO, we need when we disable the HDMI controller to switch away from getting our pixels from the pixelvalve and instead use blank pixels, and switch back to the pixelvalve when we enable the HDMI controller. Reviewed-by: Dave Stevenson

[PATCH v5 45/80] drm/vc4: hdmi: Add container_of macros for encoders and connectors

2020-09-04 Thread Maxime Ripard
Whenever the code needs to access the vc4_hdmi structure from a DRM connector or encoder, it first accesses the drm_device associated to the connector, then retrieve the drm_dev private data which gives it a pointer to our vc4_dev, and will finally follow the vc4_hdmi pointer in that structure.

[PULL] drm-misc-next

2020-09-04 Thread Maxime Ripard
Hi Dave, Daniel, Here's this week PR for drm-misc-next Thanks! Maxime drm-misc-next-2020-09-03: drm-misc-next for 5.10: UAPI Changes: Cross-subsystem Changes: Core Changes: - doc: update the doc to encourage drivers to use devm_drm_dev_alloc - ttm: More reworks / cleanups Driver

[PATCH v5 54/80] drm/vc4: hdmi: Add PHY RNG enable / disable function

2020-09-04 Thread Maxime Ripard
Let's continue the implementation of hooks for the parts that change in the BCM2711 SoC with the PHY RNG setup. Reviewed-by: Dave Stevenson Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 15

[PATCH v5 19/80] drm/vc4: crtc: Disable color management for HVS5

2020-09-04 Thread Maxime Ripard
The HVS5 uses different color matrices. Disable color management support for now. Reviewed-by: Eric Anholt Tested-by: Chanwoo Choi Tested-by: Hoegeun Kwon Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 17 +++--

Re: [PATCH] drm/exynos: Drop local dma_parms

2020-09-04 Thread Marek Szyprowski
Hi Robin, On 03.09.2020 22:51, Robin Murphy wrote: > Since commit 9495b7e92f71 ("driver core: platform: Initialize dma_parms > for platform devices"), struct platform_device already provides a > dma_parms structure, so we can save allocating another one. > > Also the DMA segment size is simply a

[PATCH 1/3] drm/v3d: Don't resubmit guilty CSD jobs

2020-09-04 Thread Yukimasa Sugizaki
The previous code misses a check for the timeout error set by drm_sched_resubmit_jobs(), which results in an infinite GPU reset loop if once a timeout occurs: [ 178.799106] v3d fec0.v3d: [drm:v3d_reset [v3d]] *ERROR* Resetting GPU for hang. [ 178.807836] v3d fec0.v3d: [drm:v3d_reset

  1   2   3   >