> -----Original Message----- > From: Valkeinen, Tomi > Sent: Tuesday, November 08, 2011 8:54 PM > To: Hiremath, Vaibhav > Cc: linux-media@vger.kernel.org; Taneja, Archit > Subject: RE: [PATCH] omap_vout: fix section mismatch > > On Tue, 2011-11-08 at 15:15 +0000, Hiremath, Vaibhav wrote: > > > I am not sure whether you had tested it, but kernel doesn't boot with > V4L2 display enabled in defconfig. I have patch to fix this, will submit > shortly - > > > > > > diff --git a/drivers/media/video/omap/omap_vout.c > b/drivers/media/video/omap/omap_vout.c > > index 9c5c19f..9031c39 100644 > > --- a/drivers/media/video/omap/omap_vout.c > > +++ b/drivers/media/video/omap/omap_vout.c > > @@ -2140,6 +2140,8 @@ static int omap_vout_remove(struct platform_device > *pdev) > > omap_vout_cleanup_device(vid_dev->vouts[k]); > > > > for (k = 0; k < vid_dev->num_displays; k++) { > > + if (!vid_dev->displays[k] && !vid_dev->displays[k]- > >driver) > > + continue; > > if (vid_dev->displays[k]->state != > OMAP_DSS_DISPLAY_DISABLED) > > vid_dev->displays[k]->driver->disable(vid_dev- > >displays[k]); > > > > @@ -2226,7 +2228,7 @@ static int __init omap_vout_probe(struct > platform_device *pdev) > > for (i = 0; i < vid_dev->num_displays; i++) { > > struct omap_dss_device *display = vid_dev->displays[i]; > > > > - if (display->driver->update) > > + if (display && display->driver && display->driver- > >update) > > display->driver->update(display, 0, 0, > > display->panel.timings.x_res, > > display->panel.timings.y_res); > > > > > > Reason being, > > > > If you have enabled certain device and fail to enable in defconfig, this > will lead to kernel crash in omap_vout driver. > > Hmm, I didn't quite understand the explanation. But now that you mention > this, I did have the following patch in one of my work trees, but I seem > to have forgotten to post it. > > It fixes the case where a display device defined in the board file > doesn't have a driver loaded. I guess this is the same problem you > mention? Is my patch fixing the same problem? > > diff --git a/drivers/media/video/omap/omap_vout.c > b/drivers/media/video/omap/omap_vout.c > index 30d8896..18fe02f 100644 > --- a/drivers/media/video/omap/omap_vout.c > +++ b/drivers/media/video/omap/omap_vout.c > @@ -2159,6 +2159,14 @@ static int __init omap_vout_probe(struct > platform_device *pdev) > vid_dev->num_displays = 0; > for_each_dss_dev(dssdev) { > omap_dss_get_device(dssdev); > + > + if (!dssdev->driver) { > + dev_warn(&pdev->dev, "no driver for display: %s\n", > + dssdev->name); > + omap_dss_put_device(dssdev); > + continue; > + } > + > vid_dev->displays[vid_dev->num_displays++] = dssdev; > } >
Can you submit the patch? I have tested this and it works for me. Thanks, Vaibhav > Tomi -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html