public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/4] drm/i915/display: move modeset asserts out of intel_display.c
@ 2021-09-30  9:22 Jani Nikula
  2021-09-30  9:22 ` [Intel-gfx] [PATCH 1/4] drm/i915/fdi: move fdi modeset asserts to intel_fdi.c Jani Nikula
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Jani Nikula @ 2021-09-30  9:22 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula, ville.syrjala

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-10-01  8:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-30  9:22 [Intel-gfx] [PATCH 0/4] drm/i915/display: move modeset asserts out of intel_display.c Jani Nikula
2021-09-30  9:22 ` [Intel-gfx] [PATCH 1/4] drm/i915/fdi: move fdi modeset asserts to intel_fdi.c Jani Nikula
2021-09-30  9:44   ` Ville Syrjälä
2021-09-30 10:24     ` Jani Nikula
2021-10-01  8:49       ` Jani Nikula
2021-09-30  9:22 ` [Intel-gfx] [PATCH 2/4] drm/i915/pps: move pps (panel) modeset asserts to intel_pps.c Jani Nikula
2021-09-30  9:23 ` [Intel-gfx] [PATCH 3/4] drm/i915/dpll: move dpll modeset asserts to intel_dpll.c Jani Nikula
2021-09-30  9:23 ` [Intel-gfx] [PATCH 4/4] drm/i915/dsi: move dsi pll modeset asserts to vlv_dsi_pll.c Jani Nikula
2021-09-30 10:40 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: move modeset asserts out of intel_display.c Patchwork
2021-09-30 11:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-09-30 13:23 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox