All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] VSP trivial enhancements
@ 2021-03-01 12:02 Biju Das
  2021-03-01 12:02 ` [PATCH 1/2] media: v4l: vsp1: Fix bru null pointer access Biju Das
  2021-03-01 12:02 ` [PATCH 2/2] media: v4l: vsp1: Fix uif " Biju Das
  0 siblings, 2 replies; 4+ messages in thread
From: Biju Das @ 2021-03-01 12:02 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Biju Das, Laurent Pinchart, Kieran Bingham, linux-media,
	linux-renesas-soc, Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad

This patch series fixes 2 null pointer issues on the below cases

1) Use BRS without BRU module

2) UIF module is not used.

This issues were found during display bringup on RZ/G2L SoC.
RZ/G2L has only BRS module and no UIF module.

Biju Das (2):
  media: v4l: vsp1: Fix bru null pointer access
  media: v4l: vsp1: Fix uif null pointer access

 drivers/media/platform/vsp1/vsp1_drm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] media: v4l: vsp1: Fix bru null pointer access
  2021-03-01 12:02 [PATCH 0/2] VSP trivial enhancements Biju Das
@ 2021-03-01 12:02 ` Biju Das
  2021-03-01 12:02 ` [PATCH 2/2] media: v4l: vsp1: Fix uif " Biju Das
  1 sibling, 0 replies; 4+ messages in thread
From: Biju Das @ 2021-03-01 12:02 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Biju Das, Laurent Pinchart, Kieran Bingham, linux-media,
	linux-renesas-soc, Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad

RZ/G2L SoC has only BRS. This patch fixes null pointer access,when only
BRS is enabled.

Fixes: cbb7fa49c7466("media: v4l: vsp1: Rename BRU to BRx")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/media/platform/vsp1/vsp1_drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c
index 86d5e3f4b1ff..f6d2f47a4058 100644
--- a/drivers/media/platform/vsp1/vsp1_drm.c
+++ b/drivers/media/platform/vsp1/vsp1_drm.c
@@ -245,7 +245,7 @@ static int vsp1_du_pipeline_setup_brx(struct vsp1_device *vsp1,
 		brx = &vsp1->bru->entity;
 	else if (pipe->brx && !drm_pipe->force_brx_release)
 		brx = pipe->brx;
-	else if (!vsp1->bru->entity.pipe)
+	else if (vsp1_feature(vsp1, VSP1_HAS_BRU) && !vsp1->bru->entity.pipe)
 		brx = &vsp1->bru->entity;
 	else
 		brx = &vsp1->brs->entity;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] media: v4l: vsp1: Fix uif null pointer access
  2021-03-01 12:02 [PATCH 0/2] VSP trivial enhancements Biju Das
  2021-03-01 12:02 ` [PATCH 1/2] media: v4l: vsp1: Fix bru null pointer access Biju Das
@ 2021-03-01 12:02 ` Biju Das
  1 sibling, 0 replies; 4+ messages in thread
From: Biju Das @ 2021-03-01 12:02 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Biju Das, Laurent Pinchart, Kieran Bingham, linux-media,
	linux-renesas-soc, Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad

RZ/G2L SoC has no UIF. This patch fixes null pointer access, when UIF
module is not used.

Fixes: 5e824f989e6e8("media: v4l: vsp1: Integrate DISCOM in display pipeline")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/media/platform/vsp1/vsp1_drm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c
index f6d2f47a4058..06f74d410973 100644
--- a/drivers/media/platform/vsp1/vsp1_drm.c
+++ b/drivers/media/platform/vsp1/vsp1_drm.c
@@ -462,9 +462,9 @@ static int vsp1_du_pipeline_setup_inputs(struct vsp1_device *vsp1,
 	 * make sure it is present in the pipeline's list of entities if it
 	 * wasn't already.
 	 */
-	if (!use_uif) {
+	if (drm_pipe->uif && !use_uif) {
 		drm_pipe->uif->pipe = NULL;
-	} else if (!drm_pipe->uif->pipe) {
+	} else if (drm_pipe->uif && !drm_pipe->uif->pipe) {
 		drm_pipe->uif->pipe = pipe;
 		list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities);
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 0/2] VSP trivial enhancements
@ 2021-03-01 12:08 Biju Das
  0 siblings, 0 replies; 4+ messages in thread
From: Biju Das @ 2021-03-01 12:08 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Biju Das, Laurent Pinchart, Kieran Bingham, linux-media,
	linux-renesas-soc, Geert Uytterhoeven, Chris Paterson, Biju Das,
	Prabhakar Mahadev Lad

This patch series fixes 2 null pointer issues on the below cases

1) Use BRS without BRU module

2) UIF module is not used.

This issues were found during display bringup on RZ/G2L SoC.
RZ/G2L has only BRS module and no UIF module.

Biju Das (2):
  media: v4l: vsp1: Fix bru null pointer access
  media: v4l: vsp1: Fix uif null pointer access

 drivers/media/platform/vsp1/vsp1_drm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-01 12:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-01 12:02 [PATCH 0/2] VSP trivial enhancements Biju Das
2021-03-01 12:02 ` [PATCH 1/2] media: v4l: vsp1: Fix bru null pointer access Biju Das
2021-03-01 12:02 ` [PATCH 2/2] media: v4l: vsp1: Fix uif " Biju Das
2021-03-01 12:08 [PATCH 0/2] VSP trivial enhancements Biju Das

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.