OMAPDSS: remove ovl/mgr check-code temporarily
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 15 Nov 2011 11:37:33 +0000 (13:37 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 2 Dec 2011 06:54:40 +0000 (08:54 +0200)
DSS currently tries to check that the given overlay and overlay manager
settings are acceptable, but the code does not work quite properly.
Things may change between the check and the actual use of the settings.

Furthermore, the following patches will rewrite how settings are
configured and managed, and trying to keep the (broken) settings
checking working during the rewrite would be very difficult.

This patch removes the checking code, and a working version of checking
will be added back after the settings rewrite has been done.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/apply.c
drivers/video/omap2/dss/dss.h
drivers/video/omap2/dss/manager.c
drivers/video/omap2/dss/overlay.c

index 1aab0a340ee904d01c17a85017c2b96702c5a221..b5a542fbd8187b97006c800e902ca13921b16701 100644 (file)
@@ -503,10 +503,9 @@ end:
        spin_unlock(&data_lock);
 }
 
-static int omap_dss_mgr_apply_ovl(struct omap_overlay *ovl)
+static void omap_dss_mgr_apply_ovl(struct omap_overlay *ovl)
 {
        struct ovl_priv_data *op;
-       struct omap_dss_device *dssdev;
 
        op = get_ovl_priv(ovl);
 
@@ -520,21 +519,11 @@ static int omap_dss_mgr_apply_ovl(struct omap_overlay *ovl)
                        op->enabled = false;
                        op->dirty = true;
                }
-               return 0;
+               return;
        }
 
        if (!ovl->info_dirty)
-               return 0;
-
-       dssdev = ovl->manager->device;
-
-       if (dss_check_overlay(ovl, dssdev)) {
-               if (op->enabled) {
-                       op->enabled = false;
-                       op->dirty = true;
-               }
-               return -EINVAL;
-       }
+               return;
 
        ovl->info_dirty = false;
        op->dirty = true;
@@ -543,8 +532,6 @@ static int omap_dss_mgr_apply_ovl(struct omap_overlay *ovl)
        op->channel = ovl->manager->id;
 
        op->enabled = true;
-
-       return 0;
 }
 
 static void omap_dss_mgr_apply_mgr(struct omap_overlay_manager *mgr)
@@ -665,18 +652,7 @@ void dss_mgr_disable(struct omap_overlay_manager *mgr)
 int dss_mgr_set_info(struct omap_overlay_manager *mgr,
                struct omap_overlay_manager_info *info)
 {
-       int r;
-       struct omap_overlay_manager_info old_info;
-
-       old_info = mgr->info;
        mgr->info = *info;
-
-       r = dss_check_manager(mgr);
-       if (r) {
-               mgr->info = old_info;
-               return r;
-       }
-
        mgr->info_dirty = true;
 
        return 0;
@@ -692,7 +668,6 @@ int dss_mgr_set_device(struct omap_overlay_manager *mgr,
                struct omap_dss_device *dssdev)
 {
        int r;
-       struct omap_overlay *ovl;
 
        if (dssdev->manager) {
                DSSERR("display '%s' already has a manager '%s'\n",
@@ -706,15 +681,6 @@ int dss_mgr_set_device(struct omap_overlay_manager *mgr,
                return -EINVAL;
        }
 
-       list_for_each_entry(ovl, &mgr->overlays, list) {
-               if (!ovl->info.enabled)
-                       continue;
-
-               r = dss_check_overlay(ovl, dssdev);
-               if (r)
-                       return r;
-       }
-
        dssdev->manager = mgr;
        mgr->device = dssdev;
        mgr->device_changed = true;
@@ -748,20 +714,7 @@ int dss_mgr_unset_device(struct omap_overlay_manager *mgr)
 int dss_ovl_set_info(struct omap_overlay *ovl,
                struct omap_overlay_info *info)
 {
-       int r;
-       struct omap_overlay_info old_info;
-
-       old_info = ovl->info;
        ovl->info = *info;
-
-       if (ovl->manager) {
-               r = dss_check_overlay(ovl, ovl->manager->device);
-               if (r) {
-                       ovl->info = old_info;
-                       return r;
-               }
-       }
-
        ovl->info_dirty = true;
 
        return 0;
index 41f69a10d3591bfd391d435c5d52268f564c1aa9..a5493df14eee2368e2677e5097af30549200824f 100644 (file)
@@ -206,12 +206,10 @@ void default_get_overlay_fifo_thresholds(enum omap_plane plane,
 /* manager */
 int dss_init_overlay_managers(struct platform_device *pdev);
 void dss_uninit_overlay_managers(struct platform_device *pdev);
-int dss_check_manager(struct omap_overlay_manager *mgr);
 
 /* overlay */
 void dss_init_overlays(struct platform_device *pdev);
 void dss_uninit_overlays(struct platform_device *pdev);
-int dss_check_overlay(struct omap_overlay *ovl, struct omap_dss_device *dssdev);
 void dss_overlay_setup_dispc_manager(struct omap_overlay_manager *mgr);
 void dss_recheck_connections(struct omap_dss_device *dssdev, bool force);
 
index ab0b61b716f145204153caf834b8b0ee83653e1d..d7fd494908d86333b03cd2b40a2d5ab1e0331448 100644 (file)
@@ -485,23 +485,6 @@ static int dss_mgr_wait_for_vsync(struct omap_overlay_manager *mgr)
        return omap_dispc_wait_for_irq_interruptible_timeout(irq, timeout);
 }
 
-int dss_check_manager(struct omap_overlay_manager *mgr)
-{
-       if (dss_has_feature(FEAT_ALPHA_FIXED_ZORDER)) {
-               /*
-                * OMAP3 supports only graphics source transparency color key
-                * and alpha blending simultaneously. See TRM 15.4.2.4.2.2
-                * Alpha Mode
-                */
-               if (mgr->info.partial_alpha_enabled && mgr->info.trans_enabled
-                       && mgr->info.trans_key_type !=
-                               OMAP_DSS_COLOR_KEY_GFX_DST)
-                       return -EINVAL;
-       }
-
-       return 0;
-}
-
 int dss_init_overlay_managers(struct platform_device *pdev)
 {
        int i, r;
index 00c01a3955540663f7aa7894ee10bb570dba41f1..4dc6b92592d00db939a3b47e54ab098e54e2b911 100644 (file)
@@ -430,96 +430,6 @@ static struct kobj_type overlay_ktype = {
        .default_attrs = overlay_sysfs_attrs,
 };
 
-/* Check if overlay parameters are compatible with display */
-int dss_check_overlay(struct omap_overlay *ovl, struct omap_dss_device *dssdev)
-{
-       struct omap_overlay_info *info;
-       u16 outw, outh;
-       u16 dw, dh;
-       int i;
-
-       if (!dssdev)
-               return 0;
-
-       if (!ovl->info.enabled)
-               return 0;
-
-       info = &ovl->info;
-
-       if (info->paddr == 0) {
-               DSSDBG("check_overlay failed: paddr 0\n");
-               return -EINVAL;
-       }
-
-       dssdev->driver->get_resolution(dssdev, &dw, &dh);
-
-       DSSDBG("check_overlay %d: (%d,%d %dx%d -> %dx%d) disp (%dx%d)\n",
-                       ovl->id,
-                       info->pos_x, info->pos_y,
-                       info->width, info->height,
-                       info->out_width, info->out_height,
-                       dw, dh);
-
-       if ((ovl->caps & OMAP_DSS_OVL_CAP_SCALE) == 0) {
-               outw = info->width;
-               outh = info->height;
-       } else {
-               if (info->out_width == 0)
-                       outw = info->width;
-               else
-                       outw = info->out_width;
-
-               if (info->out_height == 0)
-                       outh = info->height;
-               else
-                       outh = info->out_height;
-       }
-
-       if (dw < info->pos_x + outw) {
-               DSSDBG("check_overlay failed 1: %d < %d + %d\n",
-                               dw, info->pos_x, outw);
-               return -EINVAL;
-       }
-
-       if (dh < info->pos_y + outh) {
-               DSSDBG("check_overlay failed 2: %d < %d + %d\n",
-                               dh, info->pos_y, outh);
-               return -EINVAL;
-       }
-
-       if ((ovl->supported_modes & info->color_mode) == 0) {
-               DSSERR("overlay doesn't support mode %d\n", info->color_mode);
-               return -EINVAL;
-       }
-
-       if (ovl->caps & OMAP_DSS_OVL_CAP_ZORDER) {
-               if (info->zorder < 0 || info->zorder > 3) {
-                       DSSERR("zorder out of range: %d\n",
-                               info->zorder);
-                       return -EINVAL;
-               }
-               /*
-                * Check that zorder doesn't match with zorder of any other
-                * overlay which is enabled and is also connected to the same
-                * manager
-                */
-               for (i = 0; i < omap_dss_get_num_overlays(); i++) {
-                       struct omap_overlay *tmp_ovl = omap_dss_get_overlay(i);
-
-                       if (tmp_ovl->id != ovl->id &&
-                                       tmp_ovl->manager == ovl->manager &&
-                                       tmp_ovl->info.enabled == true &&
-                                       tmp_ovl->info.zorder == info->zorder) {
-                               DSSERR("%s and %s have same zorder: %d\n",
-                                       ovl->name, tmp_ovl->name, info->zorder);
-                               return -EINVAL;
-                       }
-               }
-       }
-
-       return 0;
-}
-
 int omap_dss_get_num_overlays(void)
 {
        return num_overlays;
This page took 0.029254 seconds and 5 git commands to generate.