drm/msm: convert to drm_bridge
Drop the msm_connector base class, and special calls to base class methods from the encoder, and use instead drm_bridge. This allows for a cleaner division between the hdmi (and in future dsi) blocks, from the mdp block. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
struct hdmi_phy;
|
||||
|
||||
struct hdmi {
|
||||
struct kref refcount;
|
||||
|
||||
struct drm_device *dev;
|
||||
struct platform_device *pdev;
|
||||
|
||||
@@ -45,6 +47,10 @@ struct hdmi {
|
||||
struct hdmi_phy *phy;
|
||||
struct i2c_adapter *i2c;
|
||||
struct drm_connector *connector;
|
||||
struct drm_bridge *bridge;
|
||||
|
||||
/* the encoder we are hooked to (outside of hdmi block) */
|
||||
struct drm_encoder *encoder;
|
||||
|
||||
bool hdmi_mode; /* are we in hdmi mode? */
|
||||
|
||||
@@ -58,9 +64,7 @@ struct hdmi_platform_config {
|
||||
};
|
||||
|
||||
void hdmi_set_mode(struct hdmi *hdmi, bool power_on);
|
||||
void hdmi_destroy(struct hdmi *hdmi);
|
||||
int hdmi_init(struct hdmi *hdmi, struct drm_device *dev,
|
||||
struct drm_connector *connector);
|
||||
void hdmi_destroy(struct kref *kref);
|
||||
|
||||
static inline void hdmi_write(struct hdmi *hdmi, u32 reg, u32 data)
|
||||
{
|
||||
@@ -72,6 +76,17 @@ static inline u32 hdmi_read(struct hdmi *hdmi, u32 reg)
|
||||
return msm_readl(hdmi->mmio + reg);
|
||||
}
|
||||
|
||||
static inline struct hdmi * hdmi_reference(struct hdmi *hdmi)
|
||||
{
|
||||
kref_get(&hdmi->refcount);
|
||||
return hdmi;
|
||||
}
|
||||
|
||||
static inline void hdmi_unreference(struct hdmi *hdmi)
|
||||
{
|
||||
kref_put(&hdmi->refcount, hdmi_destroy);
|
||||
}
|
||||
|
||||
/*
|
||||
* The phy appears to be different, for example between 8960 and 8x60,
|
||||
* so split the phy related functions out and load the correct one at
|
||||
@@ -89,17 +104,21 @@ struct hdmi_phy {
|
||||
const struct hdmi_phy_funcs *funcs;
|
||||
};
|
||||
|
||||
/*
|
||||
* phy can be different on different generations:
|
||||
*/
|
||||
struct hdmi_phy *hdmi_phy_8960_init(struct hdmi *hdmi);
|
||||
struct hdmi_phy *hdmi_phy_8x60_init(struct hdmi *hdmi);
|
||||
|
||||
/*
|
||||
* hdmi bridge:
|
||||
*/
|
||||
|
||||
struct drm_bridge *hdmi_bridge_init(struct hdmi *hdmi);
|
||||
|
||||
/*
|
||||
* hdmi connector:
|
||||
*/
|
||||
|
||||
void hdmi_connector_irq(struct drm_connector *connector);
|
||||
struct drm_connector *hdmi_connector_init(struct hdmi *hdmi);
|
||||
|
||||
/*
|
||||
* i2c adapter for ddc:
|
||||
|
Reference in New Issue
Block a user