aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2009-09-21 13:42:27 -0400
committerEric Anholt <eric@anholt.net>2009-09-21 18:47:33 -0400
commite70236a8d3d0a4c100a0b9f7d394d9bda9c56aca (patch)
treeb9852594a97f0f2c28060aa0397868d052a5ac69 /drivers/gpu/drm/i915/i915_drv.h
parent8542a0bbbbda412560820b4c3b04e8399e2e99c1 (diff)
drm/i915: split display functions by chip type
This patch splits out several of the display functions into a separate display function table to avoid tons of chipset specific if..else if..else if blocks all over. There are more opportunities for this (some noted in the structure defintition); so more cleanup patches will follow. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 2f89c2136be9..ebdc639e9858 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -153,6 +153,23 @@ struct drm_i915_error_state {
153 struct timeval time; 153 struct timeval time;
154}; 154};
155 155
156struct drm_i915_display_funcs {
157 void (*dpms)(struct drm_crtc *crtc, int mode);
158 bool (*fbc_enabled)(struct drm_crtc *crtc);
159 void (*enable_fbc)(struct drm_crtc *crtc, unsigned long interval);
160 void (*disable_fbc)(struct drm_device *dev);
161 int (*get_display_clock_speed)(struct drm_device *dev);
162 int (*get_fifo_size)(struct drm_device *dev, int plane);
163 void (*update_wm)(struct drm_device *dev, int planea_clock,
164 int planeb_clock, int sr_hdisplay, int pixel_size);
165 /* clock updates for mode set */
166 /* cursor updates */
167 /* render clock increase/decrease */
168 /* display clock increase/decrease */
169 /* pll clock increase/decrease */
170 /* clock gating init */
171};
172
156typedef struct drm_i915_private { 173typedef struct drm_i915_private {
157 struct drm_device *dev; 174 struct drm_device *dev;
158 175
@@ -252,6 +269,9 @@ typedef struct drm_i915_private {
252 struct work_struct error_work; 269 struct work_struct error_work;
253 struct workqueue_struct *wq; 270 struct workqueue_struct *wq;
254 271
272 /* Display functions */
273 struct drm_i915_display_funcs display;
274
255 /* Register state */ 275 /* Register state */
256 bool suspended; 276 bool suspended;
257 u8 saveLBB; 277 u8 saveLBB;