Skip to contentSkip to conversation

drm/i915: split power-related items into intel_pm module

PATCH In review Eugeni Dodonov 5 participants 5 messages Apr 16, 2012 – Apr 17, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: split power-related items into intel_pm module

As previously discussed on irc with Daniel, Ben and Jesse, This patch moves the power-related functionality into intel_pm module, aiming at simplifying the intel_display code and make it less cluttered.

The functionality affected by this move are: clock gating, rc6 and rps, display watermarks, display fifo-related items, cxsr and FBC.

This simplifies intel_display by +/- 2800 lines of code and centralizes most of the power-related items in one place to simplify future hardware enablement and subsystems interaction.

CC Jesse Barnes <[email protected]>
CC Ben Widawsky <[email protected]>
CC Daniel Vetter <[email protected]>
CC Chris Wilson <[email protected]>
---
 drivers/gpu/drm/i915/Makefile        |    1 +
 drivers/gpu/drm/i915/intel_display.c | 7801 +++++++++++-----------------------
 drivers/gpu/drm/i915/intel_drv.h     |   58 +
 drivers/gpu/drm/i915/intel_pm.c      | 2899 +++++++++++++
 4 files changed, 5419 insertions(+), 5340 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_pm.c
drivers/gpu/drm/i915/Makefile +1 -0
index f801330..b65c06f 100644
@@ -23,6 +23,7 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o \
 	  intel_sdvo.o \
 	  intel_modes.o \
 	  intel_panel.o \
+	  intel_pm.o \
 	  intel_i2c.o \
 	  intel_fb.o \
 	  intel_tv.o \
drivers/gpu/drm/i915/intel_display.c +2461 -5340

2,993 lines not on this page · raw message

drivers/gpu/drm/i915/intel_drv.h +58 -0

58 lines not on this page · raw message

drivers/gpu/drm/i915/intel_pm.c new file +2899 -0

2,899 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 6 lines
1.7.10

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 10 lines · Eugeni Dodonov

As previously discussed on irc with Daniel, Ben and Jesse, This patch moves the power-related functionality into intel_pm module, aiming at simplifying the intel_display code and make it less cluttered.

The functionality affected by this move are: clock gating, rc6 and rps, display watermarks, display fifo-related items, cxsr and FBC.

This simplifies intel_display by +/- 2800 lines of code and centralizes most of the power-related items in one place to simplify future hardware enablement and subsystems interaction.

Diff is making this really difficult to verify that no functional change is taking place. Suggestions? A series of small commits? -Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#2 lore raw
Quoted 9 lines · Chris Wilson
Quoted 7 lines · Eugeni Dodonov

As previously discussed on irc with Daniel, Ben and Jesse, This patch moves the power-related functionality into intel_pm module, aiming at simplifying the intel_display code and make it less cluttered.

The functionality affected by this move are: clock gating, rc6 and rps, display watermarks, display fifo-related items, cxsr and FBC.

Quoted 7 lines
Quoted 3 lines

This simplifies intel_display by +/- 2800 lines of code and centralizes most of the power-related items in one place to simplify future hardware enablement and subsystems interaction.

Diff is making this really difficult to verify that no functional change is taking place. Suggestions? A series of small commits?

I am fine with making it into a small series of commits which move 1 subsystem at a time (fbc, cxsr, rc6, fifo, wm, ...). Would everyone be happy with that? I think Daniel wanted to move everything in 1 commit, hence this initial approach from my side, but yes, as functions are spread all around the place it makes very hard to review the patch.

But in general, does this idea of intel_pm.c looks interesting, or anyone has anything against it?

Signature · 2 lines
Eugeni Dodonov
 <http://eugeni.dodonov.net/>

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Acked-by
#3 lore raw
Quoted 22 lines · On Mon, 16 Apr 2012 21:08:22 -0300 Eugeni Dodonov <[email protected]> wrote:
Quoted 11 lines · Chris Wilson
Quoted 9 lines · Eugeni Dodonov

As previously discussed on irc with Daniel, Ben and Jesse, This patch moves the power-related functionality into intel_pm module, aiming at simplifying the intel_display code and make it less cluttered.

The functionality affected by this move are: clock gating, rc6 and rps, display watermarks, display fifo-related items, cxsr and FBC.

Quoted 7 lines
Quoted 3 lines

This simplifies intel_display by +/- 2800 lines of code and centralizes most of the power-related items in one place to simplify future hardware enablement and subsystems interaction.

Diff is making this really difficult to verify that no functional change is taking place. Suggestions? A series of small commits?

Quoted 9 lines

I am fine with making it into a small series of commits which move 1 subsystem at a time (fbc, cxsr, rc6, fifo, wm, ...). Would everyone be happy with that? I think Daniel wanted to move everything in 1 commit, hence this initial approach from my side, but yes, as functions are spread all around the place it makes very hard to review the patch.

But in general, does this idea of intel_pm.c looks interesting, or anyone has anything against it?

I like intel_pm.c
I don't have an opinion yet on 1 big commit or many small commits. I'd like if you made a description not just of what has been moved, but what belongs in this file (as a comment in the .c file).

Also in the bikeshed category:
I don't feel like FBC belongs here.
I also don't know about display watermarks, and certain fifo things. Similarly with fifo related stuff, some may belong, some may not - I haven't actually looked at the patch.

Anyway, when/if danvet deals with this, I like the idea very much so it's

Acked-by on v1 1/1
#4 lore raw
In reply to Eugeni Dodonov
Quoted 11 lines · On Mon, 16 Apr 2012 20:06:01 -0300 Eugeni Dodonov <[email protected]>…

As previously discussed on irc with Daniel, Ben and Jesse, This patch moves the power-related functionality into intel_pm module, aiming at simplifying the intel_display code and make it less cluttered.

The functionality affected by this move are: clock gating, rc6 and rps, display watermarks, display fifo-related items, cxsr and FBC.

This simplifies intel_display by +/- 2800 lines of code and centralizes most of the power-related items in one place to simplify future hardware enablement and subsystems interaction.

Quoted 5 lines
CC Jesse Barnes <[email protected]>
CC Ben Widawsky <[email protected]>
CC Daniel Vetter <[email protected]>
CC Chris Wilson <[email protected]>
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center