drivers/gpu/drm/xlnx/zynqmp_disp.c | 3 +++ 1 file changed, 3 insertions(+)
From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
layer->info can be null if we have an error on the first layer in
zynqmp_disp_create_layers
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
---
drivers/gpu/drm/xlnx/zynqmp_disp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c
index 9368acf56eaf..e4e0e299e8a7 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_disp.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c
@@ -1200,6 +1200,9 @@ static void zynqmp_disp_layer_release_dma(struct zynqmp_disp *disp,
{
unsigned int i;
+ if (!layer->info)
+ return;
+
for (i = 0; i < layer->info->num_channels; i++) {
struct zynqmp_disp_layer_dma *dma = &layer->dmas[i];
--
2.47.0
Hi, On 21/10/2024 16:51, Steffen Dirkwinkel wrote: > From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> > > layer->info can be null if we have an error on the first layer in > zynqmp_disp_create_layers > > Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> > --- > drivers/gpu/drm/xlnx/zynqmp_disp.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c > index 9368acf56eaf..e4e0e299e8a7 100644 > --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c > +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c > @@ -1200,6 +1200,9 @@ static void zynqmp_disp_layer_release_dma(struct zynqmp_disp *disp, > { > unsigned int i; > > + if (!layer->info) > + return; > + > for (i = 0; i < layer->info->num_channels; i++) { > struct zynqmp_disp_layer_dma *dma = &layer->dmas[i]; > I think this should also have the Fixes tag, but probably not stable material. Tomi
From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
layer->info can be null if we have an error on the first layer in
zynqmp_disp_create_layers
Fixes: 1836fd5ed98d ("drm: xlnx: zynqmp_dpsub: Minimize usage of global flag")
Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com>
---
drivers/gpu/drm/xlnx/zynqmp_disp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c
index 9368acf56eaf..e4e0e299e8a7 100644
--- a/drivers/gpu/drm/xlnx/zynqmp_disp.c
+++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c
@@ -1200,6 +1200,9 @@ static void zynqmp_disp_layer_release_dma(struct zynqmp_disp *disp,
{
unsigned int i;
+ if (!layer->info)
+ return;
+
for (i = 0; i < layer->info->num_channels; i++) {
struct zynqmp_disp_layer_dma *dma = &layer->dmas[i];
--
2.47.0
Hi, On 28/10/2024 15:39, Steffen Dirkwinkel wrote: > From: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> > > layer->info can be null if we have an error on the first layer in > zynqmp_disp_create_layers > > Fixes: 1836fd5ed98d ("drm: xlnx: zynqmp_dpsub: Minimize usage of global flag") > Signed-off-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> > --- > drivers/gpu/drm/xlnx/zynqmp_disp.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c > index 9368acf56eaf..e4e0e299e8a7 100644 > --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c > +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c > @@ -1200,6 +1200,9 @@ static void zynqmp_disp_layer_release_dma(struct zynqmp_disp *disp, > { > unsigned int i; > > + if (!layer->info) > + return; > + > for (i = 0; i < layer->info->num_channels; i++) { > struct zynqmp_disp_layer_dma *dma = &layer->dmas[i]; > Thanks, will apply to drm-misc-next. Tomi
© 2016 - 2024 Red Hat, Inc.