Troubles with layered objects

I create design on screen with two fullscreen panels , one hiden.
In code then call

    if (lv_obj_has_flag(ui_PanelTOP,LV_OBJ_FLAG_HIDDEN)) {
        lv_obj_clear_flag(ui_PanelTOP, LV_OBJ_FLAG_HIDDEN);

and before and after too is called on bottom panel child bar set value every 68ms.

lv_bar_set_value(ui_Bar1, (int32_t)(ldb * 10), LV_ANIM_OFF);

Unhiden panel is corrupted on flush phase. If commented set bar value all is ok. But bar ofcourse dont work.
I need help.

8.3.7 used with lowyanGFX


Does the bar itself work? I mean as the value of the bar changes does it look good?

All in project works ok except hide unhide or change parent on big panels.
Today i test on old 8.1.0 no issue, but i require newer func.

8.2 from git too OK

8.3.0 FAIL !

I locate issue to flushcb and DMA and method how lvgl 8.3 draw.
I repeat test on GFX library without DMA (more as half slower) and issue dont show on 8.3

With lowyan i use lgfx::Bus_Parallel8 _bus_instance;

/* Display flushing */
void my_disp_flush( lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p )
int16_t yl1;
static bool ccss ;

  if(area->y1 >= screenHeight) {
//    lv_disp_flush_ready( disp );return;
     yl1 = area->y1 - screenHeight;
    if(ccss) gfx.endWrite();
    digitalWrite(DSPS_CS, HIGH);
    ccss = false;
  else {
    yl1 = area->y1;
    if(!ccss) gfx.endWrite();
    ccss = true;
    digitalWrite(DSPS_CS, LOW);
  int16_t w = ( area->x2 - area->x1 + 1 );
  int16_t h = ( area->y2 - area->y1 + 1 );

//if(h < GUIBUFLINES) Serial.printf("%d %d %d %d %d \r\n",area->x1,area->x2,area->y1,area->y2,h);

//handle cross blocks  
if(area->y1 < screenHeight && area->y2 >= screenHeight) 
  h= screenHeight - area->y1 ;
  Serial.printf("Problem %d %d %d %d \r\n",area->x1,area->x2,area->y1,area->y2);

    if (gfx.getStartCount() == 0)
    {   // Processing if not yet started
    gfx.pushImageDMA( area->x1
                    , yl1
                    , w
                    , h
                    , ( lgfx::swap565_t* )&color_p->full);

if(area->y1 < screenHeight && area->y2 >= screenHeight) {

    digitalWrite(DSPS_CS, HIGH);
    ccss = false;
    if (gfx.getStartCount() == 0) gfx.startWrite();
gfx.pushImageDMA( area->x1
                    , 0
                    , w
                    , ( area->y2 - area->y1 + 1 ) - h
                    , ( lgfx::swap565_t* )( &color_p->full + (w*h)));

     lv_disp_flush_ready( disp );

two display mode.

Do you see the issue you use only one display? I suspect that the problem is lurking somewhere in the two display management in the flush_cb. However, in this case it shouldn’t have worked with v8.2.

So let’s try to narrow it down a little bit.

Project work in 8.1 and 8.2 too, and this issue dont happen, but yes in this versions occurs simmilar trouble on other place and curiously on other display. But here i men not with hide, but with set parent calls.

From GitHub:

LVGL part of bug is that calling set changes on invisible objects invoke flush_cb. You can test Hide bar aside other object and call update random value into bar .

LVGL should ingnore the invalidation of hidden objects.

What is this issue exactly. Maybe it’s related to hiding somehow.

No as i write on git, on hide unhide change parrents lvgl start big refresh, but code send changes to other objects (irelevant visible or not) flush is called for this changes in the middle or on other speed as big refresh and this seems corrupt DMA sequencing.

Are you sure , that child object of hidden parrent is too hidden in your if example ? And ofcourse too i can overblend object not hidden.

True, it should check the parents too:

Could you try by replacing this line code with this:

	lv_obj_t * obj_tmp = obj;
	while(obj_tmp) {
		if(lv_obj_has_flag(obj_tmp, LV_OBJ_FLAG_HIDDEN)) return false;
		obj_tmp = lv_obj_get_parent(obj_tmp);

Yes this may help, but i continue testing and see, that :slight_smile:

  1. My config two display 320x240 aranged as one x480
  2. Panels SLS created over displays 320x240
  3. In panels as parrent placed gui
  4. Hide panel produce bigger arrea refresh = primary problem Hide on display 2 produce first flush y 235-264 maybe shadows (not used)
  5. This result into split flush on DMA corrupt

Now i ignore first 5 lines for disp 1, because real update is disp2 and all works.
Exist some setting for limit flush expand on some object? First flush need y1=240 if somethink changed on disp2