mbox series

[v2,0/2] drm: fix and cleanup legacy gamma support

Message ID 20201208135759.451772-1-tomi.valkeinen@ti.com (mailing list archive)
Headers show
Series drm: fix and cleanup legacy gamma support | expand

Message

Tomi Valkeinen Dec. 8, 2020, 1:57 p.m. UTC
Hi,

This is v2 of the series.

The first patch fixes legacy gamma table for HW which have a degamma lut
block before CTM block, but no gamma lut after the CTM. This will allow
us to add CTM support to omapdrm, which only has "pre-gamma" i.e.
de-gamma table.

The second one cleans up the legacy gamma support a bit by handling
legacy gamma for modern drivers in the drm core.

Changes in v2:
- Use bitfields for has_gamma_prop and has_degamma_prop
- Drop use_degamma variable
- Also fix gamma/degamma handling in setcmap_atomic, which I had missed
  earlier.
- Fix comments that were still referring to drm_atomic_helper_legacy_gamma_set
- Drop drm_atomic_helper_legacy_gamma_set use from intel_display.c which
  I had missed earlier.
- Move the declaration of the new functions to drm_crtc_internal.h

I didn't add Laurent's RBs as I felt the changes were too big to keep
the RB.

Ville has a WIP branch at

git://github.com/vsyrjala/linux.git fb_helper_c8_lut_4

which does more extensive cleanups to the gamma handling. That work is
slightly overlapping with this series, but afaics the concepts do not
conflict as such (but the code changes do conflict).

 Tomi

Tomi Valkeinen (2):
  drm: add legacy support for using degamma for gamma
  drm: automatic legacy gamma support

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   1 -
 .../gpu/drm/arm/display/komeda/komeda_crtc.c  |   1 -
 drivers/gpu/drm/arm/malidp_crtc.c             |   1 -
 drivers/gpu/drm/armada/armada_crtc.c          |   1 -
 drivers/gpu/drm/ast/ast_mode.c                |   1 -
 .../gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c    |   1 -
 drivers/gpu/drm/drm_atomic_helper.c           |  70 ----------
 drivers/gpu/drm/drm_color_mgmt.c              | 122 ++++++++++++++++--
 drivers/gpu/drm/drm_crtc_internal.h           |   6 +
 drivers/gpu/drm/drm_fb_helper.c               |  21 +--
 drivers/gpu/drm/i915/display/intel_display.c  |   1 -
 drivers/gpu/drm/ingenic/ingenic-drm-drv.c     |   2 -
 drivers/gpu/drm/mediatek/mtk_drm_crtc.c       |   1 -
 drivers/gpu/drm/nouveau/dispnv50/head.c       |   2 -
 drivers/gpu/drm/omapdrm/omap_crtc.c           |   1 -
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c        |   1 -
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c   |   1 -
 drivers/gpu/drm/stm/ltdc.c                    |   1 -
 drivers/gpu/drm/vc4/vc4_crtc.c                |   1 -
 drivers/gpu/drm/vc4/vc4_txp.c                 |   1 -
 include/drm/drm_atomic_helper.h               |   4 -
 include/drm/drm_crtc.h                        |   3 +
 22 files changed, 135 insertions(+), 109 deletions(-)