Page MenuHomeFreeBSD

Allwinner A20 HDMI support
ClosedPublic

Authored by jmcneill_invisible.ca on Feb 21 2016, 9:33 PM.
Tags
Referenced Files
Unknown Object (File)
Sun, May 5, 2:17 AM
Unknown Object (File)
Mon, Apr 29, 7:16 AM
Unknown Object (File)
Sun, Apr 28, 6:50 PM
Unknown Object (File)
Sat, Apr 27, 9:04 PM
Unknown Object (File)
Fri, Apr 26, 6:14 PM
Unknown Object (File)
Tue, Apr 9, 5:49 AM
Unknown Object (File)
Mar 27 2024, 5:01 AM
Unknown Object (File)
Mar 25 2024, 7:19 AM
Subscribers

Details

Reviewers
andrew
Group Reviewers
ARM
Commits
rS296064: Add Allwinner A20 HDMI support.
Summary

Support for the HDMI transmitter on the Allwinner A20 SoC. Features DDC/EDID and audio support.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jmcneill_invisible.ca retitled this revision from to Allwinner A20 HDMI support.
jmcneill_invisible.ca updated this object.
jmcneill_invisible.ca edited the test plan for this revision. (Show Details)
jmcneill_invisible.ca added a reviewer: ARM.
jmcneill_invisible.ca set the repository for this revision to rS FreeBSD src repository - subversion.
jmcneill_invisible.ca added a project: ARM.
sys/arm/allwinner/a10_fb.c
180 ↗(On Diff #13583)

Why M_NOWAIT?

436 ↗(On Diff #13583)

Should this be under bootverbose?

sys/arm/allwinner/a10_hdmi.c
200 ↗(On Diff #13583)

Why an array?

248 ↗(On Diff #13583)

if ((hpd & HPD_DET) == HPD_DET)

390 ↗(On Diff #13583)
return ((edid[CEA_DTD] & DTD_BASIC_AUDIO) == DTD_BASIC_AUDIO)

or

return ((edid[CEA_DTD] & DTD_BASIC_AUDIO) != 0)
sys/arm/allwinner/a10_hdmiaudio.c
53 ↗(On Diff #13583)

tab

70 ↗(On Diff #13583)

This line looks quite wide, is it past 80 characters?

372 ↗(On Diff #13583)

Where did this number come from? (131072 == 0x20000)

sys/arm/allwinner/files.allwinner
22–24 ↗(On Diff #13583)

Are these a10 specific?

sys/boot/fdt/dts/arm/sun7i-a20-hdmi.dtsi
31–46 ↗(On Diff #13583)

Where did these compat strings come from?

sys/arm/allwinner/a10_fb.c
180 ↗(On Diff #13583)

It's a lot of memory and it needs to be physically contiguous (and no GART or IOMMU as far as I can tell). If the HDMI cable is plugged in some time after boot, memory may be fragmented and can fail.

The alternative is to reserve memory early at boot to account for the largest possible framebuffer. Not sure what the top end should be if we want to support hotplug (DEBE can support up to 8Kx8K layers -- a single layer at 32bpp would be 256MB!).

436 ↗(On Diff #13583)

You're right, I'll fix it.

sys/arm/allwinner/a10_hdmi.c
200 ↗(On Diff #13583)

No specific reason, I will fix it.

sys/arm/allwinner/a10_hdmiaudio.c
372 ↗(On Diff #13583)

I pulled it out of the air. Will update this to use pcm_getbuffersize.

sys/arm/allwinner/files.allwinner
22–24 ↗(On Diff #13583)

a10_fb.c: a10, a20, a31, and a80 share the same display engine. Later SoCs (e.g. a83t) are different (datasheet refers to it as "DE2.0").

a10_hdmi.c: a10/a20 have the same hdmi ("HDMI 1.3") block. a31 has a block that is mostly the same ("HDMI 1.4") with a different DDC interface and a few other minor changes. Later SoCs (a80, a83t, etc) have something completely different (not documented in the datasheet).

sys/boot/fdt/dts/arm/sun7i-a20-hdmi.dtsi
31–46 ↗(On Diff #13583)

I made them up, they are not in Linux mainline and the vendor tree doesn't use FDT.

  • Hide edid_print with bootverbose
  • Fix size of struct resource * array in a10fb_softc
  • No need for struct resource * array in a10hdmi_softc
  • Style fixes
  • Use pcm_getbuffersize to determine a10hdmiaudio DMA buffer size
andrew added a reviewer: andrew.
This revision is now accepted and ready to land.Feb 25 2016, 11:01 AM
This revision was automatically updated to reflect the committed changes.