diff mbox

[1/2] drm/msm: remove the drm_device_is_unplugged check

Message ID 1454709464-2536-1-git-send-email-hshi@chromium.org (mailing list archive)
State New, archived
Headers show

Commit Message

Haixia Shi Feb. 5, 2016, 9:57 p.m. UTC
This flag is only used for drm/udl.

Signed-off-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
---
 drivers/gpu/drm/msm/msm_fbdev.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

David Herrmann Feb. 9, 2016, 10:25 a.m. UTC | #1
Hi

On Fri, Feb 5, 2016 at 10:57 PM, Haixia Shi <hshi@chromium.org> wrote:
> This flag is only used for drm/udl.

Furthermore, it is horribly racy. Lets not make use of it outside of udl.

Reviewed-by: David Herrmann <dh.herrmann@gmail.com>

Thanks
David

> Signed-off-by: Haixia Shi <hshi@chromium.org>
> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
> ---
>  drivers/gpu/drm/msm/msm_fbdev.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
> index d95af6e..e119c29 100644
> --- a/drivers/gpu/drm/msm/msm_fbdev.c
> +++ b/drivers/gpu/drm/msm/msm_fbdev.c
> @@ -65,9 +65,6 @@ static int msm_fbdev_mmap(struct fb_info *info, struct vm_area_struct *vma)
>         struct drm_device *dev = helper->dev;
>         int ret = 0;
>
> -       if (drm_device_is_unplugged(dev))
> -               return -ENODEV;
> -
>         ret = drm_gem_mmap_obj(drm_obj, drm_obj->size, vma);
>         if (ret) {
>                 pr_err("%s:drm_gem_mmap_obj fail\n", __func__);
> --
> 2.7.0.rc3.207.g0ac5344
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter Feb. 9, 2016, 1:03 p.m. UTC | #2
On Tue, Feb 09, 2016 at 11:25:27AM +0100, David Herrmann wrote:
> Hi
> 
> On Fri, Feb 5, 2016 at 10:57 PM, Haixia Shi <hshi@chromium.org> wrote:
> > This flag is only used for drm/udl.
> 
> Furthermore, it is horribly racy. Lets not make use of it outside of udl.
> 
> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>

Applied to drm-misc (assuming that 2/2 will go in there too).
-Daniel

> 
> Thanks
> David
> 
> > Signed-off-by: Haixia Shi <hshi@chromium.org>
> > Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
> > ---
> >  drivers/gpu/drm/msm/msm_fbdev.c | 3 ---
> >  1 file changed, 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
> > index d95af6e..e119c29 100644
> > --- a/drivers/gpu/drm/msm/msm_fbdev.c
> > +++ b/drivers/gpu/drm/msm/msm_fbdev.c
> > @@ -65,9 +65,6 @@ static int msm_fbdev_mmap(struct fb_info *info, struct vm_area_struct *vma)
> >         struct drm_device *dev = helper->dev;
> >         int ret = 0;
> >
> > -       if (drm_device_is_unplugged(dev))
> > -               return -ENODEV;
> > -
> >         ret = drm_gem_mmap_obj(drm_obj, drm_obj->size, vma);
> >         if (ret) {
> >                 pr_err("%s:drm_gem_mmap_obj fail\n", __func__);
> > --
> > 2.7.0.rc3.207.g0ac5344
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
index d95af6e..e119c29 100644
--- a/drivers/gpu/drm/msm/msm_fbdev.c
+++ b/drivers/gpu/drm/msm/msm_fbdev.c
@@ -65,9 +65,6 @@  static int msm_fbdev_mmap(struct fb_info *info, struct vm_area_struct *vma)
 	struct drm_device *dev = helper->dev;
 	int ret = 0;
 
-	if (drm_device_is_unplugged(dev))
-		return -ENODEV;
-
 	ret = drm_gem_mmap_obj(drm_obj, drm_obj->size, vma);
 	if (ret) {
 		pr_err("%s:drm_gem_mmap_obj fail\n", __func__);