Repository navigation
KMS Writeback Fixes - #4924
KMS Writeback Fixes#4924
Conversation
By default, the HVS driver will force the HVS output 3 to be muxed to the HVS channel 2. However, the Transposer can only be assigned to the HVS channel 2, so whenever we try to use the writeback connector, we'll mux its associated output (Output 2) to the channel 2. This leads to both the output 2 and 3 feeding from the same channel, which is explicitly discouraged in the documentation. In order to avoid this, let's reset all the output muxes to their reset value. Fixes: 87ebcd4 ("drm/vc4: crtc: Assign output to channel automatically") Signed-off-by: Maxime Ripard <maxime@cerno.tech>
We use the channel from our vc4_crtc_state structure in multiple places, let's store it in a local variable to make it cleaner. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
The documentation explicitly states we must prevent the output 2 and 3 from feeding from the same HVS channel. Let's add a warning to make some noise if we ever find ourselves in such a case. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
By padding, you are referring to the X byte in XRGB8888 (rather than unused pixels if stride is wider than width)? |
Yes
It's not really clear to me what most software would like :) Similarly, I'm not sure whether IGT expectations that all hardware can force the X component to 0xff is reasonable. We'll see how the discussion turns out |
|
All look reasonable to me. Minor grammatical niggle on
"The documentation explicitly states we must prevent one HVS channel feeding multiple outputs simultaneously. Let's add a warning to make some noise if we ever find ourselves in such a case on output 2" Or we could add a check on each of the channels just to make sure. In an RGBX format you would hope that the X really was ignored, but acknowledge that for things like IGT it is far easier to just hash the entire buffer, however that does then put expectations on how the writeback connector should function. |
|
Consensus here is ff for the unused X/alpha value is as good as any value. |
When debugging, finding out what muxing decisions were made and what the actual core clock rate is is always useful, so let's add some more messages. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
The TXP_VSTART_AT_EOF will generate a second VSTART signal to the HVS. However, the HVS waits for VSTART to enable the FIFO and will thus start filling the FIFO before the start of the frame. This leads to corruption at the beginning of the first frame, and content from the previous frame at the beginning of the next frames. Since one VSTART is enough, let's get rid of it. Fixes: 008095e ("drm/vc4: Add support for the transposer block") Signed-off-by: Maxime Ripard <maxime@cerno.tech>
If we use a format that has padding instead of the alpha component (such as XRGB8888), it appears that the Transposer will fill the padding to 0, disregarding what was stored in the input buffer padding. This leads to issues with IGT, since it will set the padding to 0xff, but will then compare the CRC of the two frames which will thus fail. Fixes: 008095e ("drm/vc4: Add support for the transposer block") Signed-off-by: Maxime Ripard <maxime@cerno.tech>
485de88 to
eaf9ce5
Compare
kernel: ARM: dts: bcm2711-rpi-ds: Disable the BCM2835 STC See: #1702 kernel: KMS Writeback Fixes See: raspberrypi/linux#4924 kernel: staging: vc04_services: codec: Add support for V4L2_PIX_FMT_RGBA32 format See: raspberrypi/linux#4931 kernel: drm/vc4: Fix out of order frames during asynchronous page flips See: raspberrypi/linux#4925
kernel: ARM: dts: bcm2711-rpi-ds: Disable the BCM2835 STC See: raspberrypi/firmware#1702 kernel: KMS Writeback Fixes See: raspberrypi/linux#4924 kernel: staging: vc04_services: codec: Add support for V4L2_PIX_FMT_RGBA32 format See: raspberrypi/linux#4931 kernel: drm/vc4: Fix out of order frames during asynchronous page flips See: raspberrypi/linux#4925
Hi,
Here's a few fixes to fix the timeouts for the IGT writeback tests.
The last patch is probably going to be controversial, and I'm not sure what the right solution could be.
I've started a thread on the mailing lists to see if it's appropriate of if we should find a better solution:
https://lore.kernel.org/dri-devel/20220304144607.3pwfwhxf4zsckan7@houat/T/#u
Fixes #4874