linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: fix for mailbox read size
@ 2018-11-06 15:37 Damian Kos
  2018-11-19 14:18 ` Heiko Stuebner
  0 siblings, 1 reply; 2+ messages in thread
From: Damian Kos @ 2018-11-06 15:37 UTC (permalink / raw)
  To: linux-arm-kernel

Some of the functions (like cdn_dp_dpcd_read, cdn_dp_get_edid_block)
allow to read 64KiB, but the cdn_dp_mailbox_read_receive, that is
used by them, can read only up to 255 bytes at once. Normally, it's
not a big issue as DPCD or EDID reads won't (hopefully) exceed that
value.
The real issue here is the revocation list read during the HDCP
authentication process. (problematic use case:
https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.4/drivers/gpu/drm/rockchip/cdn-dp-reg.c#1152)
The list can reach 127*5+4 bytes (num devs * 5 bytes per ID/Bksv +
4 bytes of an additional info).
In other words - CTSes with HDCP Repeater won't pass without this
fix. Oh, and the driver will most likely stop working (best case
scenario).

Signed-off-by: Damian Kos <dkos@cadence.com>
---
 drivers/gpu/drm/rockchip/cdn-dp-reg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/cdn-dp-reg.c b/drivers/gpu/drm/rockchip/cdn-dp-reg.c
index 3105965fc260..5a485489a1e2 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-reg.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-reg.c
@@ -147,7 +147,7 @@ static int cdn_dp_mailbox_validate_receive(struct cdn_dp_device *dp,
 }
 
 static int cdn_dp_mailbox_read_receive(struct cdn_dp_device *dp,
-				       u8 *buff, u8 buff_size)
+				       u8 *buff, u16 buff_size)
 {
 	u32 i;
 	int ret;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] drm/rockchip: fix for mailbox read size
  2018-11-06 15:37 [PATCH] drm/rockchip: fix for mailbox read size Damian Kos
@ 2018-11-19 14:18 ` Heiko Stuebner
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Stuebner @ 2018-11-19 14:18 UTC (permalink / raw)
  To: linux-arm-kernel

Am Dienstag, 6. November 2018, 16:37:05 CET schrieb Damian Kos:
> Some of the functions (like cdn_dp_dpcd_read, cdn_dp_get_edid_block)
> allow to read 64KiB, but the cdn_dp_mailbox_read_receive, that is
> used by them, can read only up to 255 bytes at once. Normally, it's
> not a big issue as DPCD or EDID reads won't (hopefully) exceed that
> value.
> The real issue here is the revocation list read during the HDCP
> authentication process. (problematic use case:
> https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.4/drivers/gpu/drm/rockchip/cdn-dp-reg.c#1152)
> The list can reach 127*5+4 bytes (num devs * 5 bytes per ID/Bksv +
> 4 bytes of an additional info).
> In other words - CTSes with HDCP Repeater won't pass without this
> fix. Oh, and the driver will most likely stop working (best case
> scenario).
> 
> Signed-off-by: Damian Kos <dkos@cadence.com>

applied to drm-misc-next

Thanks
Heiko

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-19 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-06 15:37 [PATCH] drm/rockchip: fix for mailbox read size Damian Kos
2018-11-19 14:18 ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).