Jetson TK1 & HDMI output in mainline kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mikko, Thierry,

While setting up my Jetson TK1 using the mainline kernel I discovered that the HDMI output
didn't work.

After some more debugging I discovered that this commit 404bfb78daf3bedafb0bfab24947059575cbea3d
(gpu: host1x: Add IOMMU support) was the culprit.

As far as I understand it host1x_probe() calls iommu_attach_device(), which in turn tries to
find the 'iommus' property in the DT. But the hdmi@54280000 device has no such property and so
iommu_attach_device() returns -ENODEV and the host1x_probe fails.

After making this extremely ugly patch it all works again:

diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 2c58a390123a..683f3a5f382a 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -186,6 +186,11 @@ static int host1x_probe(struct platform_device *pdev)
 			return -ENOMEM;

 		err = iommu_attach_device(host->domain, &pdev->dev);
+		if (err == -ENODEV) {
+			iommu_domain_free(host->domain);
+			host->domain = NULL;
+			goto no_mmu;
+		}
 		if (err)
 			goto fail_free_domain;

@@ -197,7 +202,7 @@ static int host1x_probe(struct platform_device *pdev)
 				 geometry->aperture_end >> order);
 		host->iova_end = geometry->aperture_end;
 	}
-
+no_mmu:
 	err = host1x_channel_list_init(&host->channel_list,
 				       host->info->nb_channels);
 	if (err) {

My plan is to use my Jetson TK1 to upstream the Tegra CEC driver that I wrote, but
a working HDMI output would help a lot :-)

I'm not sure if my analysis of the cause is correct, but if someone can take a look
then I would appreciate that!

Regards,

	Hans
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux