Video devices propagate ioctls down the pipeline by calling vpl_ioctl
themselves. This also happens when propagating VPL_PREPARE.
simple-panel doesn't have anything special to do in VPL_PREPARE, so
it returned -ENOSYS so far. This leads vpl_ioctl to fail, which in
turn is propagated back through the pipeline.

For devices with multiple endpoints, vpl_ioctl passes the ioctl
to each one of them. An early exit by a simple-panel can thus cause
other endpoints to not prepare themselves leading to display
issues.

Fix this by having the simple panel ignore ioctls that aren't relevant
to it.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 drivers/video/simple-panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/simple-panel.c b/drivers/video/simple-panel.c
index 1d05153d1669..2f904a7b2bee 100644
--- a/drivers/video/simple-panel.c
+++ b/drivers/video/simple-panel.c
@@ -135,7 +135,7 @@ static int simple_panel_ioctl(struct vpl *vpl, unsigned int 
port,
        case VPL_GET_VIDEOMODES:
                return simple_panel_get_modes(panel, ptr);
        default:
-               return -ENOSYS;
+               return 0;
        }
 }
 
-- 
2.28.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to