Re: [PATCH 02/10] drm/i915/lvds: Introduce intel_lvds_connector

Ben Widawsky
2011-04-22T17:50:49Z

On Fri, Apr 22, 2011 at 10:19:10AM +0100, Chris Wilson wrote:
> Introduce a local structure to move LVDS specific information away from
> the drm_i915_private and onto the LVDS connector.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/intel_lvds.c | 31 +++++++++++++++++++++----------
> 1 files changed, 21 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
> index 0882e4c..d82c8da 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -54,11 +54,20 @@ struct intel_lvds_encoder {
> struct drm_display_mode *fixed_mode;
> };
>
> +struct intel_lvds_connector {
> + struct intel_connector base;
> +};

How about to save some eyestrain, using some macro helpers?

struct intel_lvds_connector {
struct intel_connector base;
#define drm_base \
base.base
#define drm_dev \
drm_base.dev
#define drm_funcs \
drm_base.funcs
};

Similarly with lvds_encoder, and intel_dp structures if you so desire.

Ben