File structures of BBB AM335x Frame buffer driver

Hi, everyone

Can you explain the file structures of BBB framebuffer driver in linux
in brief ?
Where is the start point of BBB frame buffer driver if i analyze the driver?

Thanks in advance
J.Hwan KIm

The generic framebuffer functionality is located in the drivers/gpu/drm directory of the Linux kernel. The am335x-specific framebuffer functionality is in the drivers/gpu/drm/tilcdc directory. I’m not quite sure exactly what portion of the FB functionality you are interested in, but here are a few of the important points:

  1. The setup of the I2C slaving of the HDMI framer chip (TDA998x, I believe) is in tilcdc/tilcdc_slave.c.
  2. Register set/clear/query helpers, as well as the #define’s for the various registers, for the HDMI framer chip are in tilcdc/tilcdc_regs.h.
  3. The setup of the output of the LCD pins (timing, resolution, DMA, etc.) is in tilcdc/tilcdc_crtc.c.
  4. The setup of the HDMI framer chip settings is in tilcdc/tilcdc_panel.c.
  5. The supported resolutions for CEA (video and audio over HDMI) and non-CEA (video-only) video modes are in the arrays listed in drm_edid_modes.h.
  6. The code that handles the EDID query and response from the display is in drm_edid.c.
  7. The drm_fb_helper.c file contains many of the top-level functions related to the FB. One example is drm_fb_helper_fb_probe(), which sets the FB mode to the highest valid resolution reported via EDID (if you haven’t explicitly requested a video mode via the “video=” kernel command line argument). This same function also sets the default resolution to 1024x768x16 is no EDID block is reported.