[PATCH 0/4] drm/i915/display: move modeset asserts out of intel_display.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a bit of an RFC. I think there are two basic approaches:

1) Move asserts out of intel_display.c next to the functionality they
   assert. This patch series starts on this path.

2) Move basic status/state queries out of intel_display.c and have
   separate assert functions that use the query functions and then do
   the asserts. For example, add intel_fdi_tx_enabled() in intel_fdi.c,
   and have a separate assert_fdi_tx_enabled() in intel_display.c or,
   say, intel_assert.c.

There are currently examples of both approaches in code, see for example
assert_pch_dp_disabled() and assert_shared_dpll(). With approach 1, I'd
imagine moving assert_pch_dp_disabled() to g4x_dp.c too. With approach
2, I'd imagine moving assert_shared_dpll out of intel_dpll_mgr.c.

Arguably 2) is a cleaner approach, with the state queries and asserts
separated instead of bundled into one. However, there does not always
seem to be an actual need for this separation, and often the only users
for the query functions are or would be the asserts, leading to extra
code and calls. So I opted for 1) instead. If there's a need for a
separate query function, great, but if not, just bundle them together.

In any case, I think *all* the assert functions need to be moved out of
intel_display.c.


BR,
Jani.


Jani Nikula (4):
  drm/i915/fdi: move fdi modeset asserts to intel_fdi.c
  drm/i915/pps: move pps (panel) modeset asserts to intel_pps.c
  drm/i915/dpll: move dpll modeset asserts to intel_dpll.c
  drm/i915/dsi: move dsi pll modeset asserts to vlv_dsi_pll.c

 drivers/gpu/drm/i915/display/intel_color.c    |   2 +
 drivers/gpu/drm/i915/display/intel_display.c  | 162 +-----------------
 drivers/gpu/drm/i915/display/intel_display.h  |  13 --
 .../drm/i915/display/intel_display_power.c    |   3 +-
 drivers/gpu/drm/i915/display/intel_dpll.c     |  35 +++-
 drivers/gpu/drm/i915/display/intel_dpll.h     |   3 +
 drivers/gpu/drm/i915/display/intel_dsi.h      |   3 +
 drivers/gpu/drm/i915/display/intel_fdi.c      |  91 ++++++++++
 drivers/gpu/drm/i915/display/intel_fdi.h      |  10 ++
 drivers/gpu/drm/i915/display/intel_lvds.c     |   2 +
 drivers/gpu/drm/i915/display/intel_pps.c      |  59 +++++++
 drivers/gpu/drm/i915/display/intel_pps.h      |   3 +
 drivers/gpu/drm/i915/display/vlv_dsi_pll.c    |  23 +++
 13 files changed, 229 insertions(+), 180 deletions(-)

-- 
2.30.2




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux