drm: omapdrm: Remove manual update display support
All the manual update display code implements eventually ends up to just calls to omap_connector_flush(), currently implemented as an empty TODO stub. Remove it, the code can always be revived and implemented later if interest in manual update displays becomes a reality. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
5dbe443368
commit
5a35876e28
|
@ -271,18 +271,6 @@ static const struct drm_connector_helper_funcs omap_connector_helper_funcs = {
|
||||||
.best_encoder = omap_connector_attached_encoder,
|
.best_encoder = omap_connector_attached_encoder,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* flush an area of the framebuffer (in case of manual update display that
|
|
||||||
* is not automatically flushed)
|
|
||||||
*/
|
|
||||||
void omap_connector_flush(struct drm_connector *connector,
|
|
||||||
int x, int y, int w, int h)
|
|
||||||
{
|
|
||||||
struct omap_connector *omap_connector = to_omap_connector(connector);
|
|
||||||
|
|
||||||
/* TODO: enable when supported in dss */
|
|
||||||
VERB("%s: %d,%d, %dx%d", omap_connector->dssdev->name, x, y, w, h);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* initialize connector */
|
/* initialize connector */
|
||||||
struct drm_connector *omap_connector_init(struct drm_device *dev,
|
struct drm_connector *omap_connector_init(struct drm_device *dev,
|
||||||
int connector_type, struct omap_dss_device *dssdev,
|
int connector_type, struct omap_dss_device *dssdev,
|
||||||
|
|
|
@ -186,8 +186,6 @@ struct drm_connector *omap_connector_init(struct drm_device *dev,
|
||||||
struct drm_encoder *encoder);
|
struct drm_encoder *encoder);
|
||||||
struct drm_encoder *omap_connector_attached_encoder(
|
struct drm_encoder *omap_connector_attached_encoder(
|
||||||
struct drm_connector *connector);
|
struct drm_connector *connector);
|
||||||
void omap_connector_flush(struct drm_connector *connector,
|
|
||||||
int x, int y, int w, int h);
|
|
||||||
bool omap_connector_get_hdmi_mode(struct drm_connector *connector);
|
bool omap_connector_get_hdmi_mode(struct drm_connector *connector);
|
||||||
|
|
||||||
void copy_timings_omap_to_drm(struct drm_display_mode *mode,
|
void copy_timings_omap_to_drm(struct drm_display_mode *mode,
|
||||||
|
@ -208,8 +206,6 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer *fb,
|
||||||
struct omap_drm_window *win, struct omap_overlay_info *info);
|
struct omap_drm_window *win, struct omap_overlay_info *info);
|
||||||
struct drm_connector *omap_framebuffer_get_next_connector(
|
struct drm_connector *omap_framebuffer_get_next_connector(
|
||||||
struct drm_framebuffer *fb, struct drm_connector *from);
|
struct drm_framebuffer *fb, struct drm_connector *from);
|
||||||
void omap_framebuffer_flush(struct drm_framebuffer *fb,
|
|
||||||
int x, int y, int w, int h);
|
|
||||||
|
|
||||||
void omap_gem_init(struct drm_device *dev);
|
void omap_gem_init(struct drm_device *dev);
|
||||||
void omap_gem_deinit(struct drm_device *dev);
|
void omap_gem_deinit(struct drm_device *dev);
|
||||||
|
|
|
@ -121,18 +121,6 @@ static int omap_framebuffer_dirty(struct drm_framebuffer *fb,
|
||||||
struct drm_file *file_priv, unsigned flags, unsigned color,
|
struct drm_file *file_priv, unsigned flags, unsigned color,
|
||||||
struct drm_clip_rect *clips, unsigned num_clips)
|
struct drm_clip_rect *clips, unsigned num_clips)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
|
|
||||||
drm_modeset_lock_all(fb->dev);
|
|
||||||
|
|
||||||
for (i = 0; i < num_clips; i++) {
|
|
||||||
omap_framebuffer_flush(fb, clips[i].x1, clips[i].y1,
|
|
||||||
clips[i].x2 - clips[i].x1,
|
|
||||||
clips[i].y2 - clips[i].y1);
|
|
||||||
}
|
|
||||||
|
|
||||||
drm_modeset_unlock_all(fb->dev);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,34 +324,6 @@ struct drm_connector *omap_framebuffer_get_next_connector(
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* flush an area of the framebuffer (in case of manual update display that
|
|
||||||
* is not automatically flushed)
|
|
||||||
*/
|
|
||||||
void omap_framebuffer_flush(struct drm_framebuffer *fb,
|
|
||||||
int x, int y, int w, int h)
|
|
||||||
{
|
|
||||||
struct drm_connector *connector = NULL;
|
|
||||||
|
|
||||||
VERB("flush: %d,%d %dx%d, fb=%p", x, y, w, h, fb);
|
|
||||||
|
|
||||||
/* FIXME: This is racy - no protection against modeset config changes. */
|
|
||||||
while ((connector = omap_framebuffer_get_next_connector(fb, connector))) {
|
|
||||||
/* only consider connectors that are part of a chain */
|
|
||||||
if (connector->encoder && connector->encoder->crtc) {
|
|
||||||
/* TODO: maybe this should propagate thru the crtc who
|
|
||||||
* could do the coordinate translation..
|
|
||||||
*/
|
|
||||||
struct drm_crtc *crtc = connector->encoder->crtc;
|
|
||||||
int cx = max(0, x - crtc->x);
|
|
||||||
int cy = max(0, y - crtc->y);
|
|
||||||
int cw = w + (x - crtc->x) - cx;
|
|
||||||
int ch = h + (y - crtc->y) - cy;
|
|
||||||
|
|
||||||
omap_connector_flush(connector, cx, cy, cw, ch);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_FS
|
#ifdef CONFIG_DEBUG_FS
|
||||||
void omap_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m)
|
void omap_framebuffer_describe(struct drm_framebuffer *fb, struct seq_file *m)
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,42 +42,8 @@ struct omap_fbdev {
|
||||||
struct work_struct work;
|
struct work_struct work;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void omap_fbdev_flush(struct fb_info *fbi, int x, int y, int w, int h);
|
|
||||||
static struct drm_fb_helper *get_fb(struct fb_info *fbi);
|
static struct drm_fb_helper *get_fb(struct fb_info *fbi);
|
||||||
|
|
||||||
static ssize_t omap_fbdev_write(struct fb_info *fbi, const char __user *buf,
|
|
||||||
size_t count, loff_t *ppos)
|
|
||||||
{
|
|
||||||
ssize_t res;
|
|
||||||
|
|
||||||
res = fb_sys_write(fbi, buf, count, ppos);
|
|
||||||
omap_fbdev_flush(fbi, 0, 0, fbi->var.xres, fbi->var.yres);
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void omap_fbdev_fillrect(struct fb_info *fbi,
|
|
||||||
const struct fb_fillrect *rect)
|
|
||||||
{
|
|
||||||
sys_fillrect(fbi, rect);
|
|
||||||
omap_fbdev_flush(fbi, rect->dx, rect->dy, rect->width, rect->height);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void omap_fbdev_copyarea(struct fb_info *fbi,
|
|
||||||
const struct fb_copyarea *area)
|
|
||||||
{
|
|
||||||
sys_copyarea(fbi, area);
|
|
||||||
omap_fbdev_flush(fbi, area->dx, area->dy, area->width, area->height);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void omap_fbdev_imageblit(struct fb_info *fbi,
|
|
||||||
const struct fb_image *image)
|
|
||||||
{
|
|
||||||
sys_imageblit(fbi, image);
|
|
||||||
omap_fbdev_flush(fbi, image->dx, image->dy,
|
|
||||||
image->width, image->height);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void pan_worker(struct work_struct *work)
|
static void pan_worker(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct omap_fbdev *fbdev = container_of(work, struct omap_fbdev, work);
|
struct omap_fbdev *fbdev = container_of(work, struct omap_fbdev, work);
|
||||||
|
@ -121,10 +87,10 @@ static struct fb_ops omap_fb_ops = {
|
||||||
* basic fbdev ops which write to the framebuffer
|
* basic fbdev ops which write to the framebuffer
|
||||||
*/
|
*/
|
||||||
.fb_read = fb_sys_read,
|
.fb_read = fb_sys_read,
|
||||||
.fb_write = omap_fbdev_write,
|
.fb_write = fb_sys_write,
|
||||||
.fb_fillrect = omap_fbdev_fillrect,
|
.fb_fillrect = sys_fillrect,
|
||||||
.fb_copyarea = omap_fbdev_copyarea,
|
.fb_copyarea = sys_copyarea,
|
||||||
.fb_imageblit = omap_fbdev_imageblit,
|
.fb_imageblit = sys_imageblit,
|
||||||
|
|
||||||
.fb_check_var = drm_fb_helper_check_var,
|
.fb_check_var = drm_fb_helper_check_var,
|
||||||
.fb_set_par = drm_fb_helper_set_par,
|
.fb_set_par = drm_fb_helper_set_par,
|
||||||
|
@ -294,21 +260,6 @@ static struct drm_fb_helper *get_fb(struct fb_info *fbi)
|
||||||
return fbi->par;
|
return fbi->par;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* flush an area of the framebuffer (in case of manual update display that
|
|
||||||
* is not automatically flushed)
|
|
||||||
*/
|
|
||||||
static void omap_fbdev_flush(struct fb_info *fbi, int x, int y, int w, int h)
|
|
||||||
{
|
|
||||||
struct drm_fb_helper *helper = get_fb(fbi);
|
|
||||||
|
|
||||||
if (!helper)
|
|
||||||
return;
|
|
||||||
|
|
||||||
VERB("flush fbdev: %d,%d %dx%d, fbi=%p", x, y, w, h, fbi);
|
|
||||||
|
|
||||||
omap_framebuffer_flush(helper->fb, x, y, w, h);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* initialize fbdev helper */
|
/* initialize fbdev helper */
|
||||||
struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev)
|
struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
|
|
|
@ -162,7 +162,6 @@ static void omap_plane_post_apply(struct omap_drm_apply *apply)
|
||||||
container_of(apply, struct omap_plane, apply);
|
container_of(apply, struct omap_plane, apply);
|
||||||
struct drm_plane *plane = &omap_plane->base;
|
struct drm_plane *plane = &omap_plane->base;
|
||||||
struct omap_drm_private *priv = plane->dev->dev_private;
|
struct omap_drm_private *priv = plane->dev->dev_private;
|
||||||
struct omap_overlay_info *info = &omap_plane->info;
|
|
||||||
struct callback cb;
|
struct callback cb;
|
||||||
|
|
||||||
cb = omap_plane->apply_done_cb;
|
cb = omap_plane->apply_done_cb;
|
||||||
|
@ -172,11 +171,6 @@ static void omap_plane_post_apply(struct omap_drm_apply *apply)
|
||||||
|
|
||||||
if (cb.fxn)
|
if (cb.fxn)
|
||||||
cb.fxn(cb.arg);
|
cb.fxn(cb.arg);
|
||||||
|
|
||||||
if (omap_plane->enabled) {
|
|
||||||
omap_framebuffer_flush(plane->fb, info->pos_x, info->pos_y,
|
|
||||||
info->out_width, info->out_height);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int apply(struct drm_plane *plane)
|
static int apply(struct drm_plane *plane)
|
||||||
|
|
Loading…
Reference in New Issue