This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 6e798d190cf video/fb: enqueue pan information before calling pandisplay
6e798d190cf is described below

commit 6e798d190cf5079497deaf015324762b6e45895e
Author: jianglianfang <[email protected]>
AuthorDate: Fri Dec 5 16:01:17 2025 +0800

    video/fb: enqueue pan information before calling pandisplay
    
    The lower-half pandisplay callback ran before the pan request was
    queued, and could run even when the queue was full. Enqueue the
    request first so the pan information is available to the lower
    half, and skip the callback if enqueueing fails.
    
    Signed-off-by: jianglianfang <[email protected]>
    Signed-off-by: rongyichang <[email protected]>
---
 drivers/video/fb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index ca7b109652f..c5d6ee16e0e 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -1181,7 +1181,8 @@ static int fb_ioctl(FAR struct file *filep, int cmd, 
unsigned long arg)
           DEBUGASSERT(pinfo != NULL && fb->vtable != NULL);
           memcpy(&paninfo, pinfo, sizeof(*pinfo));
 
-          if (fb->vtable->pandisplay != NULL)
+          ret = fb_add_paninfo(fb, &paninfo, FB_NO_OVERLAY);
+          if (fb->vtable->pandisplay != NULL && ret == OK)
             {
               ret = fb->vtable->pandisplay(fb->vtable, pinfo);
               if (ret < 0)
@@ -1189,8 +1190,6 @@ static int fb_ioctl(FAR struct file *filep, int cmd, 
unsigned long arg)
                   break;
                 }
             }
-
-          ret = fb_add_paninfo(fb, &paninfo, FB_NO_OVERLAY);
         }
         break;
 

Reply via email to