1. 10 Nov, 2020 12 commits
    • Dinghao Liu's avatar
      drm/omap: Fix runtime PM imbalance on error · a5d704d3
      Dinghao Liu authored
      pm_runtime_get_sync() increments the runtime PM usage counter
      even when it returns an error code. However, users of its
      direct wrappers in omapdrm assume that PM usage counter will
      not change on error. Thus a pairing decrement is needed on
      the error handling path for these wrappers to keep the counter
      balanced.
      Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200822065743.13671-1-dinghao.liu@zju.edu.cn
      a5d704d3
    • Alexander A. Klimov's avatar
      drm: omapdrm: Replace HTTP links with HTTPS ones · 1b409fda
      Alexander A. Klimov authored
      Rationale:
      Reduces attack surface on kernel devs opening the links for MITM
      as HTTPS traffic is much harder to manipulate.
      
      Deterministic algorithm:
      For each file:
        If not .svg:
          For each line:
            If doesn't contain `\bxmlns\b`:
              For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
      	  If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
                  If both the HTTP and HTTPS versions
                  return 200 OK and serve the same content:
                    Replace HTTP with HTTPS.
      Signed-off-by: default avatarAlexander A. Klimov <grandmaster@al2klimov.de>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200713122859.34135-1-grandmaster@al2klimov.de
      1b409fda
    • Wang Xiaojun's avatar
      drm/tidss: use devm_platform_ioremap_resource_byname · 3945ac0e
      Wang Xiaojun authored
      Use the devm_platform_ioremap_resource_byname() helper instead of
      calling platform_get_resource_byname() and devm_ioremap_resource()
      separately.
      Signed-off-by: default avatarWang Xiaojun <wangxiaojun11@huawei.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200917062958.2183496-1-wangxiaojun11@huawei.com
      3945ac0e
    • Lee Jones's avatar
      drm/omap: dsi: Rework and remove a few unused variables · ae36fccc
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘_dsi_print_reset_status’:
       drivers/gpu/drm/omapdrm/dss/dsi.c:1131:6: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
       drivers/gpu/drm/omapdrm/dss/dsi.c: In function ‘dsi_update’:
       drivers/gpu/drm/omapdrm/dss/dsi.c:3943:10: warning: variable ‘dh’ set but not used [-Wunused-but-set-variable]
       drivers/gpu/drm/omapdrm/dss/dsi.c:3943:6: warning: variable ‘dw’ set but not used [-Wunused-but-set-variable]
      
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201105144517.1826692-9-lee.jones@linaro.org
      ae36fccc
    • Lee Jones's avatar
      drm/omap: omap_irq: Fix a couple of doc-rot issues · 67daa52d
      Lee Jones authored
      The API has been updated, but the header was not.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Function parameter or member 'crtc' not described in 'omap_irq_enable_vblank'
       drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Excess function parameter 'dev' description in 'omap_irq_enable_vblank'
       drivers/gpu/drm/omapdrm/omap_irq.c:115: warning: Excess function parameter 'pipe' description in 'omap_irq_enable_vblank'
       drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Function parameter or member 'crtc' not described in 'omap_irq_disable_vblank'
       drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Excess function parameter 'dev' description in 'omap_irq_disable_vblank'
       drivers/gpu/drm/omapdrm/omap_irq.c:142: warning: Excess function parameter 'pipe' description in 'omap_irq_disable_vblank'
      
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Rob Clark <rob.clark@linaro.org>
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201105144517.1826692-5-lee.jones@linaro.org
      67daa52d
    • Lee Jones's avatar
      drm/omap: dmm_tiler: Demote abusive use of kernel-doc format · fc4ef6b1
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:313: warning: Function parameter or member 'dmm' not described in 'dmm_txn_init'
       drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:313: warning: Function parameter or member 'tcm' not described in 'dmm_txn_init'
       drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'txn' not described in 'dmm_txn_append'
       drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'area' not described in 'dmm_txn_append'
       drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'pages' not described in 'dmm_txn_append'
       drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'npages' not described in 'dmm_txn_append'
       drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:353: warning: Function parameter or member 'roll' not described in 'dmm_txn_append'
       drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:399: warning: Function parameter or member 'txn' not described in 'dmm_txn_commit'
       drivers/gpu/drm/omapdrm/omap_dmm_tiler.c:399: warning: Function parameter or member 'wait' not described in 'dmm_txn_commit'
      
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Rob Clark <rob@ti.com>
      Cc: Andy Gross <andy.gross@ti.com>
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201106214949.2042120-10-lee.jones@linaro.org
      fc4ef6b1
    • Lee Jones's avatar
      drm/omap: gem: Fix misnamed and missing parameter descriptions · 567cd704
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/gpu/drm/omapdrm/omap_gem.c:593: warning: Function parameter or member 'file' not described in 'omap_gem_dumb_create'
       drivers/gpu/drm/omapdrm/omap_gem.c:593: warning: Excess function parameter 'drm_file' description in 'omap_gem_dumb_create'
       drivers/gpu/drm/omapdrm/omap_gem.c:619: warning: Function parameter or member 'offset' not described in 'omap_gem_dumb_map_offset'
      
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Rob Clark <rob.clark@linaro.org>
      Cc: dri-devel@lists.freedesktop.org
      Cc: linux-media@vger.kernel.org
      Cc: linaro-mm-sig@lists.linaro.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201106214949.2042120-9-lee.jones@linaro.org
      567cd704
    • Maxime Ripard's avatar
      drm: Use state helper instead of CRTC state pointer · 253f28b6
      Maxime Ripard authored
      Many drivers reference the crtc->pointer in order to get the current CRTC
      state in their atomic_begin or atomic_flush hooks, which would be the new
      CRTC state in the global atomic state since _swap_state happened when those
      hooks are run.
      
      Use the drm_atomic_get_new_crtc_state helper to get that state to make it
      more obvious.
      
      This was made using the coccinelle script below:
      
      @ crtc_atomic_func @
      identifier helpers;
      identifier func;
      @@
      
      (
      static struct drm_crtc_helper_funcs helpers = {
      	...,
      	.atomic_begin = func,
      	...,
      };
      |
      static struct drm_crtc_helper_funcs helpers = {
      	...,
      	.atomic_flush = func,
      	...,
      };
      )
      
      @@
      identifier crtc_atomic_func.func;
      identifier crtc, state;
      symbol crtc_state;
      expression e;
      @@
      
        func(struct drm_crtc *crtc, struct drm_atomic_state *state) {
        ...
      - struct tegra_dc_state *crtc_state = e;
      + struct tegra_dc_state *dc_state = e;
        <+...
      -       crtc_state
      +	dc_state
        ...+>
        }
      
      @@
      identifier crtc_atomic_func.func;
      identifier crtc, state;
      symbol crtc_state;
      expression e;
      @@
      
        func(struct drm_crtc *crtc, struct drm_atomic_state *state) {
        ...
      - struct mtk_crtc_state *crtc_state = e;
      + struct mtk_crtc_state *mtk_crtc_state = e;
        <+...
      -       crtc_state
      +	mtk_crtc_state
        ...+>
        }
      
      @ replaces_new_state @
      identifier crtc_atomic_func.func;
      identifier crtc, state, crtc_state;
      @@
      
        func(struct drm_crtc *crtc, struct drm_atomic_state *state) {
        ...
      - struct drm_crtc_state *crtc_state = crtc->state;
      + struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
        ...
       }
      
      @@
      identifier crtc_atomic_func.func;
      identifier crtc, state, crtc_state;
      @@
      
        func(struct drm_crtc *crtc, struct drm_atomic_state *state) {
        struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
        ...
      - crtc->state
      + crtc_state
        ...
       }
      
      @ adds_new_state @
      identifier crtc_atomic_func.func;
      identifier crtc, state;
      @@
      
        func(struct drm_crtc *crtc, struct drm_atomic_state *state) {
      + struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
        ...
      - crtc->state
      + crtc_state
        ...
       }
      
      @ include depends on adds_new_state || replaces_new_state @
      @@
      
       #include <drm/drm_atomic.h>
      
      @ no_include depends on !include && (adds_new_state || replaces_new_state) @
      @@
      
      + #include <drm/drm_atomic.h>
        #include <drm/...>
      Suggested-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Cc: "James (Qian) Wang" <james.qian.wang@arm.com>
      Cc: Liviu Dudau <liviu.dudau@arm.com>
      Cc: Mihail Atanassov <mihail.atanassov@arm.com>
      Cc: Brian Starkey <brian.starkey@arm.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Paul Cercueil <paul@crapouillou.net>
      Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: Sandy Huang <hjc@rock-chips.com>
      Cc: "Heiko Stübner" <heiko@sntech.de>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201105164518.392891-1-maxime@cerno.tech
      253f28b6
    • Thomas Zimmermann's avatar
      drm/mediatek: Use struct dma_buf_map in GEM vmap ops · 7e542ff8
      Thomas Zimmermann authored
      Fixes a build failure with mediatek.
      
      This change was supposed to be part of commit 49a3f51d ("drm/gem:
      Use struct dma_buf_map in GEM vmap ops and convert GEM backends"), but
      mediatek was forgotten.
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Fixes: 49a3f51d ("drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends")
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Russell King <linux+etnaviv@armlinux.org.uk>
      Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
      Cc: Qiang Yu <yuq825@gmail.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
      Cc: Steven Price <steven.price@arm.com>
      Cc: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Sandy Huang <hjc@rock-chips.com>
      Cc: "Heiko Stübner" <heiko@sntech.de>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
      Cc: Melissa Wen <melissa.srw@gmail.com>
      Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
      Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Emil Velikov <emil.velikov@collabora.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Arunpravin <apaneers@amd.com>
      Cc: Huang Rui <ray.huang@amd.com>
      Cc: Luben Tuikov <luben.tuikov@amd.com>
      Cc: Madhav Chauhan <madhav.chauhan@amd.com>
      Cc: Nirmoy Das <Nirmoy.Das@amd.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: dri-devel@lists.freedesktop.org
      Cc: etnaviv@lists.freedesktop.org
      Cc: lima@lists.freedesktop.org
      Cc: nouveau@lists.freedesktop.org
      Cc: virtualization@lists.linux-foundation.org
      Cc: spice-devel@lists.freedesktop.org
      Cc: amd-gfx@lists.freedesktop.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-rockchip@lists.infradead.org
      Cc: xen-devel@lists.xenproject.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20201109103242.19544-3-tzimmermann@suse.de
      7e542ff8
    • Thomas Zimmermann's avatar
      drm/msm: Use struct dma_buf_map in GEM vmap ops · b47f9f92
      Thomas Zimmermann authored
      Fixes a build failure with msm.
      
      This change was supposed to be part of commit 49a3f51d ("drm/gem:
      Use struct dma_buf_map in GEM vmap ops and convert GEM backends"), but
      msm was forgotten.
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Fixes: 49a3f51d ("drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backends")
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Lucas Stach <l.stach@pengutronix.de>
      Cc: Russell King <linux+etnaviv@armlinux.org.uk>
      Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
      Cc: Qiang Yu <yuq825@gmail.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
      Cc: Steven Price <steven.price@arm.com>
      Cc: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: "Christian König" <christian.koenig@amd.com>
      Cc: Sandy Huang <hjc@rock-chips.com>
      Cc: "Heiko Stübner" <heiko@sntech.de>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
      Cc: Melissa Wen <melissa.srw@gmail.com>
      Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
      Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Emil Velikov <emil.velikov@collabora.com>
      Cc: Luben Tuikov <luben.tuikov@amd.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Arunpravin <apaneers@amd.com>
      Cc: Huang Rui <ray.huang@amd.com>
      Cc: Madhav Chauhan <madhav.chauhan@amd.com>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Qinglang Miao <miaoqinglang@huawei.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: etnaviv@lists.freedesktop.org
      Cc: lima@lists.freedesktop.org
      Cc: nouveau@lists.freedesktop.org
      Cc: virtualization@lists.linux-foundation.org
      Cc: spice-devel@lists.freedesktop.org
      Cc: amd-gfx@lists.freedesktop.org
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-rockchip@lists.infradead.org
      Cc: xen-devel@lists.xenproject.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20201109103242.19544-2-tzimmermann@suse.de
      b47f9f92
    • Geert Uytterhoeven's avatar
      drm/fb_helper: Use min_t() to handle size_t and unsigned long · a3230bd7
      Geert Uytterhoeven authored
      On arm32:
      
          drivers/gpu/drm/drm_fb_helper.c: In function ‘fb_read_screen_base’:
          include/linux/minmax.h:18:28: warning: comparison of distinct pointer types lacks a cast
          ...
          drivers/gpu/drm/drm_fb_helper.c:2041:22: note: in expansion of macro ‘min’
           2041 |  size_t alloc_size = min(count, PAGE_SIZE);
      	  |                      ^~~
          drivers/gpu/drm/drm_fb_helper.c: In function ‘fb_write_screen_base’:
          include/linux/minmax.h:18:28: warning: comparison of distinct pointer types lacks a cast
          ...
          drivers/gpu/drm/drm_fb_helper.c:2115:22: note: in expansion of macro ‘min’
           2115 |  size_t alloc_size = min(count, PAGE_SIZE);
      	  |                      ^~~
      
      Indeed, on 32-bit size_t is "unsigned int", not "unsigned long".
      
      Fixes: 222ec45f ("drm/fb_helper: Support framebuffers in I/O memory")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20201110090119.2667326-1-geert+renesas@glider.be
      a3230bd7
    • KuoHsiang Chou's avatar
  2. 09 Nov, 2020 17 commits
  3. 08 Nov, 2020 7 commits
  4. 07 Nov, 2020 4 commits