Hi,
In my driver (Sigma Designs chip) I have a video layer that doesn't
support surfaces (DLCAPS_SURFACE). The content of the layer is generated
by the hardware, I can only control its position and size.
The problem is that the layer regions are frozen by default and are only
unfrozen in dfb_layer_region_flip_update(), which is only called for
graphical layers. This means my layer region can't be configured, ever.
I'm attaching a patch for DirectFB-1.4.15 that fixes the problem: it
only freezes the region for graphical layers. As far as I know, this
isn't fixed in newer versions either. If there is a standard workaround,
please let me know and feel free to ignore the patch.
Regards,
Sorin
diff -bur DirectFB-1.4.15.orig/src/core/layer_region.c DirectFB-1.4.15/src/core/layer_region.c
--- DirectFB-1.4.15.orig/src/core/layer_region.c 2011-09-29 12:51:21.000000000 +0300
+++ DirectFB-1.4.15/src/core/layer_region.c 2013-03-25 17:01:18.085675871 +0200
@@ -177,6 +177,9 @@
/* Change global reaction lock. */
fusion_object_set_lock( ®ion->object, ®ion->lock );
+ /* Only freeze the region for graphics layers. */
+ if (D_FLAGS_IS_SET( layer->shared->description.caps, DLCAPS_SURFACE ) &&
+ region->config.source_id == DLSID_SURFACE )
region->state = CLRSF_FROZEN;
if (shared->description.surface_accessor)
@@ -729,8 +732,14 @@
}
/* Check if the region should be frozen, thus requiring to apply changes explicitly. */
- if (flags & CLRCF_FREEZE)
- region->state |= CLRSF_FROZEN;
+ if (flags & CLRCF_FREEZE) {
+ /* Only freeze graphics layer regions */
+ if ((layer->shared->description.caps & DLCAPS_SURFACE) &&
+ new_config.source_id == DLSID_SURFACE)
+ D_FLAGS_SET( region->state, CLRSF_FROZEN );
+ else
+ D_FLAGS_CLEAR( region->state, CLRSF_FROZEN );
+ }
/* Propagate new configuration to the driver if the region is realized. */
if (D_FLAGS_IS_SET( region->state, CLRSF_REALIZED )) {
@@ -1185,6 +1194,10 @@
/* Update the region's state. */
D_FLAGS_CLEAR( region->state, CLRSF_REALIZED );
+
+ /* Only freeze graphics layer regions */
+ if (D_FLAGS_IS_SET( shared->description.caps, DLCAPS_SURFACE ) &&
+ region->config.source_id == DLSID_SURFACE )
D_FLAGS_SET( region->state, CLRSF_FROZEN );
/* Unlock the region buffer if it is locked. */
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev