Commit e70236a8 authored by Jesse Barnes's avatar Jesse Barnes Committed by Eric Anholt

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: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 8542a0bb
...@@ -153,6 +153,23 @@ struct drm_i915_error_state { ...@@ -153,6 +153,23 @@ struct drm_i915_error_state {
struct timeval time; struct timeval time;
}; };
struct drm_i915_display_funcs {
void (*dpms)(struct drm_crtc *crtc, int mode);
bool (*fbc_enabled)(struct drm_crtc *crtc);
void (*enable_fbc)(struct drm_crtc *crtc, unsigned long interval);
void (*disable_fbc)(struct drm_device *dev);
int (*get_display_clock_speed)(struct drm_device *dev);
int (*get_fifo_size)(struct drm_device *dev, int plane);
void (*update_wm)(struct drm_device *dev, int planea_clock,
int planeb_clock, int sr_hdisplay, int pixel_size);
/* clock updates for mode set */
/* cursor updates */
/* render clock increase/decrease */
/* display clock increase/decrease */
/* pll clock increase/decrease */
/* clock gating init */
};
typedef struct drm_i915_private { typedef struct drm_i915_private {
struct drm_device *dev; struct drm_device *dev;
...@@ -252,6 +269,9 @@ typedef struct drm_i915_private { ...@@ -252,6 +269,9 @@ typedef struct drm_i915_private {
struct work_struct error_work; struct work_struct error_work;
struct workqueue_struct *wq; struct workqueue_struct *wq;
/* Display functions */
struct drm_i915_display_funcs display;
/* Register state */ /* Register state */
bool suspended; bool suspended;
u8 saveLBB; u8 saveLBB;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment