[PATCH] media: hdmirx: snps, rk: Fix EDID injection with proper HPD toggle on RK3588

Dmitry Osipenko dmitry.osipenko at collabora.com
Wed Mar 18 12:30:07 PDT 2026


On 2/13/26 15:46, Dmitry Osipenko wrote:
> On 2/9/26 09:16, Ross Cawston wrote:
>> The existing VIDIOC_S_EDID implementation writes EDID data but does not
>> properly trigger source renegotiation on RK3588 boards. This results in
>> no visible change to the source device despite the ioctl succeeding.
>>
>> Even re-plugging the HDMI cable does not trigger renegotiation on previous
>> versions of the driver. This version reliably triggers renegotiation on
>> EDID injection on tested hardware.
>>
>> Fix by mirroring the vendor BSP behavior:
>> - Disable HDMI and DMA IRQs to avoid races.
>> - Simulate plugout if 5V power is present.
>> - Toggle HPD low before write.
>> - Schedule a delayed hotplug workqueue (1000ms) to re-enable HPD and
>>   force renegotiation.
>>
>> Bump WAIT_SIGNAL_LOCK_TIME from 300ms to 600ms to ensure lock.
>>
>> This ensures custom EDIDs take effect reliably, allowing userspace to
>> force specific resolutions/timings.
>>
>> Tested on Orange Pi 5 Ultra and Radxa Rock 5B — sources now correctly
>> re-detect and lock to the new EDID modes.
>>
>> Signed-off-by: Ross Cawston <ross at r-sc.ca>
>>
>> ---
>>  drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 43 +++++++++++++++++------
>>  1 file changed, 37 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
>> index abc123..def456 100644
>> --- a/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
>> +++ b/drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c
>> @@ -88,6 +88,10 @@
>>  	HDMIRX_NUM_RST,
>>  };
> 
> Hello Ross,
> 
> I was able to reproduce the problem and confirm that this patch fixes
> it. Will need more time to understand what's going on as pretty sure
> EDID was working properly last time I was testing it, will get back to
> you after.
> 
> BTW, kernel's source code has ./scripts/get_maintainer.pl that you
> should use before sending patch to ML to find relevant email recipients
> of the patch, otherwise it may stay unnoticed for a long time.
> 

Hi, Ross. Please give a test to [1], it fixes EDID problem with my testing.

[1]
https://lore.kernel.org/linux-media/20260318192619.3910060-1-dmitry.osipenko@collabora.com/T/#u

-- 
Best regards,
Dmitry



More information about the Linux-rockchip mailing list