diff options
author | Gustavo Diaz Prado <a0273371@ti.com> | 2012-07-16 10:27:22 -0500 |
---|---|---|
committer | Jason Simmons <jsimmons@google.com> | 2012-10-22 15:40:08 -0700 |
commit | ad1bb2394c720bb4b9e794ceffb7e8d271bf3b25 (patch) | |
tree | 4fdc4dff647dd5931f4f344fe48906ec248f3b05 | |
parent | 7a24cc1dc70da3dc57a98895010974746dafe78e (diff) | |
download | omap4-aah-ad1bb2394c720bb4b9e794ceffb7e8d271bf3b25.tar.gz |
hwc: rgz: Workaround for hdmi hotplug crash with 2D blitter enabled
When the hdmi cable is connected a hotplug event is triggered, this
forces the DSS to exhaust the pipes available in most situations
so the 2D blitter is used to handle some layers.
When the cable is connected/disconnected it's highly possible a
geometry change doesn't happen right away (or it may not happen)
leading the region data to be invalid and not recalculated for an
instant, this ends up in sending to the blitter incorrect src
rectangle origins and sizes, most of the time this leads to L3
errors making the system unstable and unable to recover.
Rebased from p-ics-mr1:
104249c hwc: rgz: Workaround for hdmi hotplug crash with 2D blitter enabled
Change-Id: Ie1675d0a0dd03e69fac80dd51cee006fcd6f8791
Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
(cherry picked from commit d5907246f792b70e82db195b1c5fb5c1c5be9d5d)
-rw-r--r-- | hwc/rgz_2d.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/hwc/rgz_2d.c b/hwc/rgz_2d.c index 444db7f..9e2dcea 100644 --- a/hwc/rgz_2d.c +++ b/hwc/rgz_2d.c @@ -689,10 +689,12 @@ static int rgz_in_hwc(rgz_in_params_t *p, rgz_t *rgz) return -1; } +#if 0 /* If there is already region data avoid parsing it again */ if (rgz->state & RGZ_REGION_DATA) { return 0; } +#endif int layerno = rgz->rgz_layerno; @@ -1622,11 +1624,23 @@ int rgz_get_screengeometry(int fd, struct bvsurfgeom *geom, int fmt) return 0; } +/* Reset the values needed for every frame, except the dirty region handles */ +static void rgz_reset(rgz_t *rgz){ + if (!rgz) + return; + if (rgz->hregions) + free(rgz->hregions); + rgz->hregions = NULL; + rgz->nhregions = 0; + rgz->state = 0; +} + int rgz_in(rgz_in_params_t *p, rgz_t *rgz) { int rv = -1; switch (p->op) { case RGZ_IN_HWC: + rgz_reset(rgz); rv = rgz_in_hwccheck(p, rgz); if (rv == RGZ_ALL) rv = rgz_in_hwc(p, rgz) ? 0 : RGZ_ALL; |