This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM816X reading EDID

Hi,

I am modifying the saLoopBackScale.c example application to include a read_EDID function so that I can scale and output the connected display's preferred resolution.  I am trying to use the ioctl calls described in the TI81XX_PSP_HDMI_User Guide (http://processors.wiki.ti.com/index.php/TI81XX_PSP_HDMI_Driver_User_Guide):

  • TI81XXHDMI_GET_STATUS- Get current status, whether streaming or not, whether a sync detected or not.
  • TI81XXHDMI_READ_EDID - Used to read the EDID of the HDMI sync.

This seems like it should be a simple implementation, but so far each ioctl fails (returns -1).  

The existing code in saLoopBackScale.c opens the hdmi display driver (/dev/video1):

disp.fd = open((const char *)DISPLAY_DEVICE, mode);
if (disp.fd == -1) {
	printf("failed to open display device\n");
	return -1;
}

Then I try to use the disp.fd for my TI81XX_GET_STATUS ioctl

if (ioctl(disp.fd, TI81XXHDMI_GET_STATUS, hdmi_status)) {
	printf("Failed to get HDMI status.\n");
	exit(2);
}

but this always fails (hdmi_status is an unsigned char).  I've tried opening /sys/devices/platform/vpss/display0 instead of /dev/video1 but still with no success.

Can anyone point me in the right direction on this, or to more documentation on these functions?

Thanks in advance,

Aaron

  • The device to use those ioctls on is actually the ti81xxhdmi device, not the V4L2 device.  You will need to open it separately - it's named something like "/dev/TI81XX_HDMI".

    The EDID from the HDMI output is also accessible by reading /sys/devices/platform/vpss/display0/edid (as a text file - it's in a human-readable table of hex bytes), but the HPD status can't be found by this method.

    - Mark

  • Hi Mark,

    Thanks!  The key was to open the /dev/TI81XX_HDMI device, and then use a pointer in the ioctl:
    ioctl(hdmi_fd, TI81XXHDMI_GET_STATUS, &hdmi_status);

    Aaron