Commit 75e9d019 authored by Patrik Jakobsson's avatar Patrik Jakobsson Committed by Dave Airlie
Browse files

gma500: Initial support for our encoder and connector structs



First step towards adding i915 alike encoder and connector abstractions. This
will make life easier when adding i915 output code into our driver. It also
removes the old psb_intel_output struct.
Signed-off-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 9e38a661
...@@ -1429,3 +1429,10 @@ struct drm_encoder *psb_intel_best_encoder(struct drm_connector *connector) ...@@ -1429,3 +1429,10 @@ struct drm_encoder *psb_intel_best_encoder(struct drm_connector *connector)
return &psb_intel_output->enc; return &psb_intel_output->enc;
} }
void psb_intel_connector_attach_encoder(struct psb_intel_connector *connector,
struct psb_intel_encoder *encoder)
{
connector->encoder = encoder;
drm_mode_connector_attach_encoder(&connector->base,
&encoder->base);
}
...@@ -93,19 +93,19 @@ struct psb_intel_i2c_chan { ...@@ -93,19 +93,19 @@ struct psb_intel_i2c_chan {
u8 slave_addr; u8 slave_addr;
}; };
struct psb_intel_output { struct psb_intel_encoder {
struct drm_connector base; struct drm_encoder base;
struct drm_encoder enc;
int type; int type;
bool needs_tv_clock;
void (*hot_plug)(struct psb_intel_encoder *);
int crtc_mask;
int clone_mask;
void *dev_priv; /* For sdvo_priv, lvds_priv, etc... */
};
struct psb_intel_i2c_chan *i2c_bus; /* for control functions */ struct psb_intel_connector {
struct psb_intel_i2c_chan *ddc_bus; /* for DDC only stuff */ struct drm_connector base;
bool load_detect_temp; struct psb_intel_encoder *encoder;
void *dev_priv;
struct psb_intel_mode_device *mode_dev;
struct i2c_adapter *hdmi_i2c_adapter; /* for control functions */
}; };
struct psb_intel_crtc_state { struct psb_intel_crtc_state {
...@@ -156,10 +156,10 @@ struct psb_intel_crtc { ...@@ -156,10 +156,10 @@ struct psb_intel_crtc {
#define to_psb_intel_crtc(x) \ #define to_psb_intel_crtc(x) \
container_of(x, struct psb_intel_crtc, base) container_of(x, struct psb_intel_crtc, base)
#define to_psb_intel_output(x) \ #define to_psb_intel_connector(x) \
container_of(x, struct psb_intel_output, base) container_of(x, struct psb_intel_connector, base)
#define enc_to_psb_intel_output(x) \ #define to_psb_intel_encoder(x) \
container_of(x, struct psb_intel_output, enc) container_of(x, struct psb_intel_encoder, base)
#define to_psb_intel_framebuffer(x) \ #define to_psb_intel_framebuffer(x) \
container_of(x, struct psb_intel_framebuffer, base) container_of(x, struct psb_intel_framebuffer, base)
...@@ -190,6 +190,16 @@ extern void psb_intel_crtc_load_lut(struct drm_crtc *crtc); ...@@ -190,6 +190,16 @@ extern void psb_intel_crtc_load_lut(struct drm_crtc *crtc);
extern void psb_intel_encoder_prepare(struct drm_encoder *encoder); extern void psb_intel_encoder_prepare(struct drm_encoder *encoder);
extern void psb_intel_encoder_commit(struct drm_encoder *encoder); extern void psb_intel_encoder_commit(struct drm_encoder *encoder);
static inline struct psb_intel_encoder *psb_intel_attached_encoder(
struct drm_connector *connector)
{
return to_psb_intel_connector(connector)->encoder;
}
extern void psb_intel_connector_attach_encoder(
struct psb_intel_connector *connector,
struct psb_intel_encoder *encoder);
extern struct drm_encoder *psb_intel_best_encoder(struct drm_connector extern struct drm_encoder *psb_intel_best_encoder(struct drm_connector
*connector); *connector);
......
Supports Markdown
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