klogg / fl2000_drm

Linux kernel FL2000DX/IT66121FN dongle DRM driver
GNU General Public License v2.0
113 stars 30 forks source link

Enable color management #18

Open klogg opened 4 years ago

klogg commented 4 years ago

Using IT66121 capabilities we can enable color conversion and gamma corrections. Something like this needed for start, then LUTs configuration etc.

   /* TODO: Setup color management and probably LUTs */
    drm_crtc_enable_color_mgmt(&drm_if->pipe.crtc, 0, false, 0);

   /* xxx->sRGB translation */
   drm_plane_create_color_properties(&drm_if->pipe.plane,
                   BIT(DRM_COLOR_YCBCR_BT601),
                   BIT(DRM_COLOR_YCBCR_LIMITED_RANGE),
                   DRM_COLOR_YCBCR_BT601,
                   DRM_COLOR_YCBCR_LIMITED_RANGE);
klogg commented 4 years ago

There is also palette configuration available [probably] for gamma corrections. Some kind of SRAM onboard?

klogg commented 4 years ago

Palette configuration is not for gamma corrections. Checked by @steve-m