Commit a42133a7 authored by Laurent Pinchart's avatar Laurent Pinchart

drm: omapdrm: Apply settings synchronously

The omapdrm driver implements a mechanism to apply new settings (due to
plane update, plane disable, plane property set, CRTC mode set or CRTC
DPMS) asynchronously. While this improves performance, it adds a level
of complexity that makes transition to the atomic update API close to
impossible. Furthermore the atomic update API requires part of the apply
operations to be synchronous (such as pinning the framebuffers), so the
current implementation needs to be changed.

Simplify the CRTC and plane code by making updates synchronous to
prepare for the switch to the atomic update API. Asynchronous update
will be implemented in a second step.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent e2cd09b2
This diff is collapsed.
...@@ -550,7 +550,6 @@ static int dev_load(struct drm_device *dev, unsigned long flags) ...@@ -550,7 +550,6 @@ static int dev_load(struct drm_device *dev, unsigned long flags)
static int dev_unload(struct drm_device *dev) static int dev_unload(struct drm_device *dev)
{ {
struct omap_drm_private *priv = dev->dev_private; struct omap_drm_private *priv = dev->dev_private;
int i;
DBG("unload: dev=%p", dev); DBG("unload: dev=%p", dev);
...@@ -559,10 +558,6 @@ static int dev_unload(struct drm_device *dev) ...@@ -559,10 +558,6 @@ static int dev_unload(struct drm_device *dev)
if (priv->fbdev) if (priv->fbdev)
omap_fbdev_free(dev); omap_fbdev_free(dev);
/* flush crtcs so the fbs get released */
for (i = 0; i < priv->num_crtcs; i++)
omap_crtc_flush(priv->crtcs[i]);
omap_modeset_free(dev); omap_modeset_free(dev);
omap_gem_deinit(dev); omap_gem_deinit(dev);
......
...@@ -50,21 +50,6 @@ struct omap_drm_window { ...@@ -50,21 +50,6 @@ struct omap_drm_window {
uint32_t src_w, src_h; uint32_t src_w, src_h;
}; };
/* Once GO bit is set, we can't make further updates to shadowed registers
* until the GO bit is cleared. So various parts in the kms code that need
* to update shadowed registers queue up a pair of callbacks, pre_apply
* which is called before setting GO bit, and post_apply that is called
* after GO bit is cleared. The crtc manages the queuing, and everyone
* else goes thru omap_crtc_apply() using these callbacks so that the
* code which has to deal w/ GO bit state is centralized.
*/
struct omap_drm_apply {
struct list_head pending_node, queued_node;
bool queued;
void (*pre_apply)(struct omap_drm_apply *apply);
void (*post_apply)(struct omap_drm_apply *apply);
};
/* For transiently registering for different DSS irqs that various parts /* For transiently registering for different DSS irqs that various parts
* of the KMS code need during setup/configuration. We these are not * of the KMS code need during setup/configuration. We these are not
* necessarily the same as what drm_vblank_get/put() are requesting, and * necessarily the same as what drm_vblank_get/put() are requesting, and
...@@ -153,13 +138,12 @@ void omap_fbdev_free(struct drm_device *dev); ...@@ -153,13 +138,12 @@ void omap_fbdev_free(struct drm_device *dev);
const struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc); const struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc);
enum omap_channel omap_crtc_channel(struct drm_crtc *crtc); enum omap_channel omap_crtc_channel(struct drm_crtc *crtc);
int omap_crtc_apply(struct drm_crtc *crtc, int omap_crtc_flush(struct drm_crtc *crtc);
struct omap_drm_apply *apply); int omap_crtc_queue_unpin(struct drm_crtc *crtc, struct drm_framebuffer *fb);
void omap_crtc_pre_init(void); void omap_crtc_pre_init(void);
void omap_crtc_pre_uninit(void); void omap_crtc_pre_uninit(void);
struct drm_crtc *omap_crtc_init(struct drm_device *dev, struct drm_crtc *omap_crtc_init(struct drm_device *dev,
struct drm_plane *plane, enum omap_channel channel, int id); struct drm_plane *plane, enum omap_channel channel, int id);
void omap_crtc_flush(struct drm_crtc *crtc);
struct drm_plane *omap_plane_init(struct drm_device *dev, struct drm_plane *omap_plane_init(struct drm_device *dev,
int id, enum drm_plane_type type); int id, enum drm_plane_type type);
...@@ -169,8 +153,7 @@ int omap_plane_mode_set(struct drm_plane *plane, ...@@ -169,8 +153,7 @@ int omap_plane_mode_set(struct drm_plane *plane,
int crtc_x, int crtc_y, int crtc_x, int crtc_y,
unsigned int crtc_w, unsigned int crtc_h, unsigned int crtc_w, unsigned int crtc_h,
unsigned int src_x, unsigned int src_y, unsigned int src_x, unsigned int src_y,
unsigned int src_w, unsigned int src_h, unsigned int src_w, unsigned int src_h);
void (*fxn)(void *), void *arg);
void omap_plane_install_properties(struct drm_plane *plane, void omap_plane_install_properties(struct drm_plane *plane,
struct drm_mode_object *obj); struct drm_mode_object *obj);
int omap_plane_set_property(struct drm_plane *plane, int omap_plane_set_property(struct drm_plane *plane,
......
This diff is collapsed.
Markdown is supported
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