summaryrefslogtreecommitdiff
path: root/linux-core/intel_drv.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-05-30 11:25:41 +1000
committerDave Airlie <airlied@redhat.com>2008-05-30 11:25:41 +1000
commit98c5cf7f6fc51f1a8f5f90b3895009cd38dd8f22 (patch)
treed6c6d50e2e244d953e135cdc71dbd1aa066709e2 /linux-core/intel_drv.h
parentdf8cd54286fbae5903d8ede390ec4a11cb6c4b6c (diff)
modesetting: reorganise out crtc/outputs are allocated.
Use subclassing from the drivers to allocate the objects. This saves two objects being allocated for each crtc/output and generally makes exit paths cleaner.
Diffstat (limited to 'linux-core/intel_drv.h')
-rw-r--r--linux-core/intel_drv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-core/intel_drv.h b/linux-core/intel_drv.h
index 9f8ca8dd..82d2d703 100644
--- a/linux-core/intel_drv.h
+++ b/linux-core/intel_drv.h
@@ -47,6 +47,7 @@ struct intel_i2c_chan {
};
struct intel_output {
+ struct drm_output base;
int type;
struct intel_i2c_chan *i2c_bus; /* for control functions */
struct intel_i2c_chan *ddc_bus; /* for DDC only stuff */
@@ -55,6 +56,7 @@ struct intel_output {
};
struct intel_crtc {
+ struct drm_crtc base;
int pipe;
int plane;
uint32_t cursor_addr;
@@ -62,6 +64,9 @@ struct intel_crtc {
int dpms_mode;
};
+#define to_intel_crtc(x) container_of(x, struct intel_crtc, base)
+#define to_intel_output(x) container_of(x, struct intel_output, base)
+
struct intel_i2c_chan *intel_i2c_create(struct drm_device *dev, const u32 reg,
const char *name);
void intel_i2c_destroy(struct intel_i2c_chan *chan);