mbox series

[0/3] drm/i915/display: Reduce global state funcs boilerplate

Message ID 20241219214909.104869-1-gustavo.sousa@intel.com (mailing list archive)
Headers show
Series drm/i915/display: Reduce global state funcs boilerplate | expand

Message

Gustavo Sousa Dec. 19, 2024, 9:48 p.m. UTC
If we look at how the members of struct intel_global_state_funcs, we see
a common pattern repeating itself. We can reduce such boilerplate by
moving the common implementation to the generic global state code. This
series proposes that.

Gustavo Sousa (3):
  drm/i915/display: Do not assume zero offset when duplicating global
    state
  drm/i915/display: Add infra to reduce global state funcs boilerplate
  drm/i915/display: Use INTEL_GLOBAL_STATE_DEFAULTS

 drivers/gpu/drm/i915/display/intel_bw.c       | 21 +---------
 drivers/gpu/drm/i915/display/intel_cdclk.c    | 16 +++-----
 .../gpu/drm/i915/display/intel_global_state.c | 41 ++++++++++++++++++-
 .../gpu/drm/i915/display/intel_global_state.h | 15 +++++++
 drivers/gpu/drm/i915/display/intel_pmdemand.c | 21 +---------
 drivers/gpu/drm/i915/display/skl_watermark.c  | 20 +--------
 6 files changed, 63 insertions(+), 71 deletions(-)