Message ID | 20190124165831.16427-7-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | some cleanups, mostly around fbdev emulation | expand |
Hi Daniel. On Thu, Jan 24, 2019 at 05:58:11PM +0100, Daniel Vetter wrote: > The fbdev emulation helpers pretty much assume that this is set. > Let's do it for everyone. I do not know this code at all. But I failed to follow the code from the patch description. It do not give _me_ a clue why the assignment is removed from drm_fb_helper_generic_probe(). But it may be obvious for people that actually know this. > > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> > --- > drivers/gpu/drm/drm_fb_helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c > index 20969c05a9e3..cbe7fda3f8af 100644 > --- a/drivers/gpu/drm/drm_fb_helper.c > +++ b/drivers/gpu/drm/drm_fb_helper.c > @@ -2126,6 +2126,7 @@ void drm_fb_helper_fill_info(struct fb_info *info, > drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); > drm_fb_helper_fill_var(info, fb_helper, fb->width, fb->height); > > + info->par = fb_helper; > snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb", > fb_helper->dev->driver->name); > > @@ -3177,7 +3178,6 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, > if (IS_ERR(fbi)) > return PTR_ERR(fbi); > > - fbi->par = fb_helper; > fbi->fbops = &drm_fbdev_fb_ops; > fbi->screen_size = fb->height * fb->pitches[0]; > fbi->fix.smem_len = fbi->screen_size; Sam
On Thu, Jan 24, 2019 at 06:45:52PM +0100, Sam Ravnborg wrote: > Hi Daniel. > > On Thu, Jan 24, 2019 at 05:58:11PM +0100, Daniel Vetter wrote: > > The fbdev emulation helpers pretty much assume that this is set. > > Let's do it for everyone. > > I do not know this code at all. > But I failed to follow the code from the patch description. > > It do not give _me_ a clue why the assignment is removed from > drm_fb_helper_generic_probe(). > But it may be obvious for people that actually know this. generic_probe calls the new fill_info function, so it's not removed, it's just moved, so that I can roll it out to all the drivers in the subsequent patches. -Daniel > > > > > > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> > > --- > > drivers/gpu/drm/drm_fb_helper.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c > > index 20969c05a9e3..cbe7fda3f8af 100644 > > --- a/drivers/gpu/drm/drm_fb_helper.c > > +++ b/drivers/gpu/drm/drm_fb_helper.c > > @@ -2126,6 +2126,7 @@ void drm_fb_helper_fill_info(struct fb_info *info, > > drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); > > drm_fb_helper_fill_var(info, fb_helper, fb->width, fb->height); > > > > + info->par = fb_helper; > > snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb", > > fb_helper->dev->driver->name); > > > > @@ -3177,7 +3178,6 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, > > if (IS_ERR(fbi)) > > return PTR_ERR(fbi); > > > > - fbi->par = fb_helper; > > fbi->fbops = &drm_fbdev_fb_ops; > > fbi->screen_size = fb->height * fb->pitches[0]; > > fbi->fix.smem_len = fbi->screen_size; > > Sam
On Fri, Jan 25, 2019 at 09:44:06AM +0100, Daniel Vetter wrote: > On Thu, Jan 24, 2019 at 06:45:52PM +0100, Sam Ravnborg wrote: > > Hi Daniel. > > > > On Thu, Jan 24, 2019 at 05:58:11PM +0100, Daniel Vetter wrote: > > > The fbdev emulation helpers pretty much assume that this is set. > > > Let's do it for everyone. > > > > I do not know this code at all. > > But I failed to follow the code from the patch description. > > > > It do not give _me_ a clue why the assignment is removed from > > drm_fb_helper_generic_probe(). > > But it may be obvious for people that actually know this. > > generic_probe calls the new fill_info function, so it's not removed, it's > just moved, so that I can roll it out to all the drivers in the subsequent > patches. Obvious new you spell it out, thanks. Patch is fine: Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 20969c05a9e3..cbe7fda3f8af 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -2126,6 +2126,7 @@ void drm_fb_helper_fill_info(struct fb_info *info, drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); drm_fb_helper_fill_var(info, fb_helper, fb->width, fb->height); + info->par = fb_helper; snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb", fb_helper->dev->driver->name); @@ -3177,7 +3178,6 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, if (IS_ERR(fbi)) return PTR_ERR(fbi); - fbi->par = fb_helper; fbi->fbops = &drm_fbdev_fb_ops; fbi->screen_size = fb->height * fb->pitches[0]; fbi->fix.smem_len = fbi->screen_size;
The fbdev emulation helpers pretty much assume that this is set. Let's do it for everyone. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> --- drivers/gpu/drm/drm_fb_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)