From 98c5cf7f6fc51f1a8f5f90b3895009cd38dd8f22 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 30 May 2008 11:25:41 +1000 Subject: 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. --- linux-core/intel_drv.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'linux-core/intel_drv.h') 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); -- cgit v1.2.3