drm/omap: Move common display enable/disable code to encoder
All .enable() and .disable() handlers for panels and connectors share common code that validates and updates the device's state. Move it to common locations in the omap_encoder_enable() and omap_encoder_disable() handlers. The enabled check in the .disable() handler is left untouched, it will be addressed separately. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Tested-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Esse commit está contido em:

commit de
Tomi Valkeinen

pai
d2c53162f5
commit
b80bfc66b0
@@ -124,20 +124,12 @@ static int nec_8048_enable(struct omap_dss_device *dssdev)
|
||||
struct omap_dss_device *src = dssdev->src;
|
||||
int r;
|
||||
|
||||
if (!omapdss_device_is_connected(dssdev))
|
||||
return -ENODEV;
|
||||
|
||||
if (omapdss_device_is_enabled(dssdev))
|
||||
return 0;
|
||||
|
||||
r = src->ops->enable(src);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
gpiod_set_value_cansleep(ddata->res_gpio, 1);
|
||||
|
||||
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -152,8 +144,6 @@ static void nec_8048_disable(struct omap_dss_device *dssdev)
|
||||
gpiod_set_value_cansleep(ddata->res_gpio, 0);
|
||||
|
||||
src->ops->disable(src);
|
||||
|
||||
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
|
||||
}
|
||||
|
||||
static void nec_8048_get_timings(struct omap_dss_device *dssdev,
|
||||
|
Referência em uma nova issue
Block a user