Skip to content
  1. Mar 25, 2020
  2. Mar 23, 2020
  3. Mar 22, 2020
  4. Mar 20, 2020
    • Tomi Valkeinen's avatar
      omapfb: Remove unused writeback code · 4f55bb03
      Tomi Valkeinen authored
      
      
      Remove unused writeback code. This code will never be used, as omapfb is
      being deprecated.
      
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200313122410.7528-1-tomi.valkeinen@ti.com
      4f55bb03
    • Randy Dunlap's avatar
      fbdev: via: fix -Wextra build warning and format warning · 6ce2fc42
      Randy Dunlap authored
      
      
      When 'VIAFB_DEBUG' and 'VIAFB_WARN' are not defined, modify the
      DEBUG_MSG() &WARN_MSG() macros to use the no_printk() macro instead of
      using <empty>.
      This fixes a build warning when -Wextra is used and provides
      printk format checking:
      
      ../drivers/video/fbdev/via/ioctl.c:88:47: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
      
      Also use %lu to print an unsigned long instead of just %l, to fix
      a printk format warning:
      
      ../drivers/video/fbdev/via/viafbdev.c: In function ‘viafb_dvp0_proc_write’:
      ../drivers/video/fbdev/via/viafbdev.c:1148:14: warning: unknown conversion type character ‘]’ in format [-Wformat=]
          DEBUG_MSG("DVP0:reg_val[%l]=:%x\n", i,
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200315041002.24473-7-rdunlap@infradead.org
      6ce2fc42
    • Randy Dunlap's avatar
      fbdev: pm[23]fb.c: fix -Wextra build warnings and errors · 1a56b9fa
      Randy Dunlap authored
      
      
      When 'DEBUG' is not defined, modify the DPRINTK() macro to use the
      no_printk() macro instead of using <empty>.
      This fixes build warnings when -Wextra is used and provides
      printk format checking:
      
      ../drivers/video/fbdev/pm2fb.c:227:38: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../drivers/video/fbdev/pm3fb.c:1039:33: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
      
      Also drop one argument in two DPRINTK() macro uses to provide the
      correct number of arguments and use the correct field in one case
      to fix a build error:
      
      ../drivers/video/fbdev/pm3fb.c:353:9: error: ‘struct fb_info’ has no member named ‘current_par’
           info->current_par->depth);
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200315041002.24473-6-rdunlap@infradead.org
      1a56b9fa
    • Randy Dunlap's avatar
      fbdev: savage: fix -Wextra build warning · 5194480c
      Randy Dunlap authored
      
      
      When 'SAVAGEFB_DEBUG' is not defined, modify the DBG() macro to use the
      no_printk() macro instead of using <empty>.
      This fixes a build warning when -Wextra is used and provides
      printk format checking:
      
      ../drivers/video/fbdev/savage/savagefb_driver.c:2411:13: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200315041002.24473-5-rdunlap@infradead.org
      5194480c
    • Randy Dunlap's avatar
      fbdev: matrox: fix -Wextra build warnings · 6ea16a0b
      Randy Dunlap authored
      
      
      When 'DEBUG' is not defined, modify the dprintk() macro to use the
      no_printk() macro instead of using <empty>.
      This fixes build warnings when -Wextra is used and provides
      printk format checking:
      
      ../drivers/video/fbdev/matrox/matroxfb_base.c:635:77: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../drivers/video/fbdev/matrox/matroxfb_Ti3026.c:632:54: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
      ../drivers/video/fbdev/matrox/matroxfb_Ti3026.c:654:53: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200315041002.24473-4-rdunlap@infradead.org
      6ea16a0b
    • Randy Dunlap's avatar
      fbdev: aty: fix -Wextra build warning · c43da061
      Randy Dunlap authored
      
      
      When 'DEBUG' is not defined, modify the DPRINTK() macro to use the
      no_printk() macro instead of using <empty>.
      This fixes a build warning when -Wextra is used and provides
      printk format checking:
      
      ../drivers/video/fbdev/aty/atyfb_base.c:784:61: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200315041002.24473-3-rdunlap@infradead.org
      c43da061
    • Randy Dunlap's avatar
      fbdev: fbmon: fix -Wextra build warnings · b5445b24
      Randy Dunlap authored
      
      
      When 'DEBUG' is not defined, modify the DPRINTK() macro to use the
      no_printk() macro instead of using <empty>.
      This fixes a build warning when -Wextra is used and provides
      printk format checking:
      
      ../drivers/video/fbdev/core/fbmon.c:812:47: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../drivers/video/fbdev/core/fbmon.c:842:24: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
      ../drivers/video/fbdev/core/fbmon.c:847:24: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
      
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Antonino Daplas <adaplas@gmail.com>
      Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200315041002.24473-2-rdunlap@infradead.org
      b5445b24
    • Takashi Iwai's avatar
      video: uvesafb: Use scnprintf() for avoiding potential buffer overflow · 06b522d6
      Takashi Iwai authored
      
      
      Since snprintf() returns the would-be-output size instead of the
      actual output size, the succeeding calls may go beyond the given
      buffer limit.  Fix it by replacing with scnprintf().
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200311093230.24900-4-tiwai@suse.de
      06b522d6
    • Takashi Iwai's avatar
      video: omap2: Use scnprintf() for avoiding potential buffer overflow · 42f21e54
      Takashi Iwai authored
      
      
      Since snprintf() returns the would-be-output size instead of the
      actual output size, the succeeding calls may go beyond the given
      buffer limit.  Fix it by replacing with scnprintf().
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200311093230.24900-3-tiwai@suse.de
      42f21e54
    • Takashi Iwai's avatar
      video: omapfb: Use scnprintf() for avoiding potential buffer overflow · bf1b615a
      Takashi Iwai authored
      
      
      Since snprintf() returns the would-be-output size instead of the
      actual output size, the succeeding calls may go beyond the given
      buffer limit.  Fix it by replacing with scnprintf().
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200311093230.24900-2-tiwai@suse.de
      bf1b615a
  5. Mar 19, 2020
    • Jiri Slaby's avatar
      drm/virtio: fix OOB in virtio_gpu_object_create · 0666a8d7
      Jiri Slaby authored
      After commit f651c8b0
      
       ("drm/virtio: factor out the sg_table from
      virtio_gpu_object"), virtio_gpu_create_object allocates too small space
      to fit everything in. It is because it allocates struct
      virtio_gpu_object, but should allocate a newly added struct
      virtio_gpu_object_shmem which has 2 more members.
      
      So fix that by using correct type in virtio_gpu_create_object.
      
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Link: http://patchwork.freedesktop.org/patch/msgid/20200319100421.16267-1-jslaby@suse.cz
      Fixes: f651c8b0
      
       ("drm/virtio: factor out the sg_table from virtio_gpu_object")
      Cc: Gurchetan Singh <gurchetansingh@chromium.org>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      0666a8d7
    • Ville Syrjälä's avatar
      drm: Skip drm_mode_config_validate() for !modeset · b684822a
      Ville Syrjälä authored
      drm_mode_config_init() may not have been called when the driver/device
      doesn't support modeset. That will cause drm_mode_config_validate()
      to oops. Skip the validation for !modeset.
      
      TODO: We may want to consider calling drm_mode_config_init()
      unconditionally to avoid similar issues elsewhere...
      
      Fixes: 74d2aacb
      
       ("drm: Validate encoder->possible_clones")
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200318182518.31618-1-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      b684822a
    • Daniel Vetter's avatar
      MAINTAINERS: Better regex for dma_buf|fence|resv · 8edb6997
      Daniel Vetter authored
      
      
      We're getting some random other stuff that we're not really interested
      in, so match only word boundaries. Also avoid the capture group while
      at it.
      
      Suggested by Joe Perches.
      
      Acked-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
      Cc: linux-media@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      Cc: linaro-mm-sig@lists.linaro.org
      Cc: Joe Perches <joe@perches.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200317205643.1028398-1-daniel.vetter@ffwll.ch
      8edb6997
    • Wambui Karuga's avatar
      drm: convert .debugfs_init() hook to return void. · 7ce84471
      Wambui Karuga authored
      As a result of commit 987d65d0
      
       (drm: debugfs: make
      drm_debugfs_create_files() never fail) and changes to various debugfs
      functions in drm/core and across various drivers, there is no need for
      the drm_driver.debugfs_init() hook to have a return value. Therefore,
      declare it as void.
      
      This also includes refactoring all users of the .debugfs_init() hook to
      return void across the subsystem.
      
      v2: include changes to the hook and drivers that use it in one patch to
      prevent driver breakage and enable individual successful compilation of
      this change.
      
      References: https://lists.freedesktop.org/archives/dri-devel/2020-February/257183.html
      Signed-off-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-18-wambui.karugax@gmail.com
      7ce84471
    • Ville Syrjälä's avatar
      drm: Validate encoder->possible_crtcs · 0df10823
      Ville Syrjälä authored
      
      
      WARN if the encoder possible_crtcs is effectively empty or contains
      bits for non-existing crtcs.
      
      v2: Move to drm_mode_config_validate() (Daniel)
          Make the docs say we WARN when this is wrong (Daniel)
          Extract full_crtc_mask()
      
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200211162208.16224-7-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      0df10823
    • Ville Syrjälä's avatar
      drm: Validate encoder->possible_clones · 74d2aacb
      Ville Syrjälä authored
      
      
      Many drivers are populating encoder->possible_clones wrong. Let's
      persuade them to get it right by adding some loud WARNs.
      
      We'll cross check the bits between any two encoders. So either
      both encoders can clone with the other, or neither can.
      
      We'll also complain about effectively empty possible_clones, and
      possible_clones containing bits for encoders that don't exist.
      
      v2: encoder->possible_clones now includes the encoder itelf
      v3: Move to drm_mode_config_validate() (Daniel)
          Document that you get a WARN when this is wrong (Daniel)
          Extract full_encoder_mask()
      v4: !! instead of ! (Daniel)
      
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200211162208.16224-6-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      74d2aacb
    • Ville Syrjälä's avatar
      drm/imx: Remove the bogus possible_clones setup · 9cb6a976
      Ville Syrjälä authored
      
      
      It's not at all clear what cloning options this driver supports.
      So let's just clear possible_clones instead of setting it to some
      bogus value.
      
      v2: Adjust the FIXME (Daniel)
      
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200211162208.16224-5-ville.syrjala@linux.intel.com
      9cb6a976
    • Ville Syrjälä's avatar
      drm/gma500: Sanitize possible_clones · 8a7827ee
      Ville Syrjälä authored
      
      
      I doubt the DP+DP and SDVO+SDVO cloning works for this driver.
      i915 at least doesn't do those. Truthfully there could be some very
      specific circumstances where some of them would do doable, but
      genereally it's too much pain to deal with so we've chose not to
      bother. Let's use the same approach for gma500.
      
      Also the LVDS+LVDS and DSI+DSI cases probably don't really exist as
      there is one of each at most.
      
      This does mean we'll now leave possible_clones at 0 for these encoder
      types whereas previosuly we included the encoder itself in the bitmask.
      But that's fine as the core now treaks 0 as a special case and adds
      the encoder itself into the final bitmask reported to userspace.
      
      Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200211162208.16224-3-ville.syrjala@linux.intel.com
      8a7827ee
    • Ville Syrjälä's avatar
      drm: Include the encoder itself in possible_clones · 71427795
      Ville Syrjälä authored
      
      
      The docs say possible_clones should always include the encoder itself.
      Since most drivers don't want to deal with the complexities of cloning
      let's allow them to set possible_clones=0 and instead we'll fix that
      up in the core.
      
      We can't put this special case into drm_encoder_init() because drivers
      will have to fill up possible_clones after adding all the relevant
      encoders. Otherwise they wouldn't know the proper encoder indexes to
      use. So we'll just do it just before registering the device.
      
      v2: Don't set the bit if possible_clones!=0 so that the
          validation (coming soon) will WARN (Thomas)
          Fix up the docs to allow possible_clones==0 (Daniel)
          .late_register() is too late, introduce drm_mode_config_validate()
          which gets called _before_ we register the char device (Daniel)
      
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200211162208.16224-2-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      71427795
    • Wambui Karuga's avatar
      drm/debugfs: remove checks for return value of drm_debugfs functions. · a212d6a5
      Wambui Karuga authored
      Since 987d65d0
      
       (drm: debugfs: make drm_debugfs_create_files() never
      fail), there is no need to check the return value of
      drm_debugfs_create_files(). Therefore, remove remove unnecessary checks
      and error handling statement blocks for its return value.
      
      These changes also enable changing drm_debugfs_create_files() to return
      void.
      
      Signed-off-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200310133121.27913-17-wambui.karugax@gmail.com
      a212d6a5
  6. Mar 18, 2020