Skip to content
  1. May 29, 2021
    • Jiapeng Chong's avatar
      drm/rockchip: remove unused function · 7455cedf
      Jiapeng Chong authored
      
      
      Fix the following clang warning:
      
      drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:320:20: warning: unused
      function 'dsi_set' [-Wunused-function].
      
      Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/1618476421-114429-1-git-send-email-jiapeng.chong@linux.alibaba.com
      7455cedf
    • Thomas Hebb's avatar
      drm/rockchip: dsi: remove extra component_del() call · b354498b
      Thomas Hebb authored
      commit cf6d100d ("drm/rockchip: dsi: add dual mipi support") added
      this devcnt field and call to component_del(). However, these both
      appear to be erroneous changes left over from an earlier version of the
      patch. In the version merged, nothing ever modifies devcnt, meaning
      component_del() runs unconditionally and in addition to the
      component_del() calls in dw_mipi_dsi_rockchip_host_detach(). The second
      call fails to delete anything and produces a warning in dmesg.
      
      If we look at the previous version of the patch[1], however, we see that
      it had logic to calculate devcnt and call component_add() in certain
      situations. This was removed in v6, and the fact that the deletion code
      was not appears to have been an oversight.
      
      [1] https://patchwork.kernel.org/project/dri-devel/patch/20180821140515.22246-8-heiko@sntech.de/
      
      Fixes: cf6d100d
      
       ("drm/rockchip: dsi: add dual mipi support")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarThomas Hebb <tommyhebb@gmail.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/201385acb0eeb5dfb037afdc6a94bfbcdab97f99.1618797778.git.tommyhebb@gmail.com
      b354498b
    • Thomas Hebb's avatar
      drm/rockchip: dsi: move all lane config except LCDC mux to bind() · 43c2de10
      Thomas Hebb authored
      When we first enable the DSI encoder, we currently program some per-chip
      configuration that we look up in rk3399_chip_data based on the device
      tree compatible we match. This data configures various parameters of the
      MIPI lanes, including on RK3399 whether DSI1 is slaved to DSI0 in a
      dual-mode configuration. It also selects which LCDC (i.e. VOP) to scan
      out from.
      
      This causes a problem in RK3399 dual-mode configurations, though: panel
      prepare() callbacks run before the encoder gets enabled and expect to be
      able to write commands to the DSI bus, but the bus isn't fully
      functional until the lane and master/slave configuration have been
      programmed. As a result, dual-mode panels (and possibly others too) fail
      to turn on when the rockchipdrm driver is initially loaded.
      
      Because the LCDC mux is the only thing we don't know until enable time
      (and is the only thing that can ever change), we can actually move most
      of the initialization to bind() and get it out of the way early. That's
      what this change does. (Rockchip's 4.4 BSP kernel does it in mode_set(),
      which also avoids the issue, but bind() seems like the more correct
      place to me.)
      
      Tested on a Google Scarlet board (Acer Chromebook Tab 10), which has a
      Kingdisplay KD097D04 dual-mode panel. Prior to this change, the panel's
      backlight would turn on but no image would appear when initially loading
      rockchipdrm. If I kept rockchipdrm loaded and reloaded the panel driver,
      it would come on. With this change, the panel successfully turns on
      during initial rockchipdrm load as expected.
      
      Fixes: 2d4f7bda
      
       ("drm/rockchip: dsi: migrate to use dw-mipi-dsi bridge driver")
      Signed-off-by: default avatarThomas Hebb <tommyhebb@gmail.com>
      Tested-by: default avatarJonathan Liu <net147@gmail.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/55fe7f3454d8c91dc3837ba5aa741d4a0e67378f.1618797813.git.tommyhebb@gmail.com
      43c2de10
    • Peter Robinson's avatar
      drm/rockchip: cdn-dp-core: add MODULE_FIRMWARE macro · c0677e41
      Peter Robinson authored
      
      
      The CDP DP component of the rockchip GPU driver requires firmware
      so define MODULE_FIRMWARE for rockchip/dptx.bin so the details
      are available in the module info.
      
      Signed-off-by: default avatarPeter Robinson <pbrobinson@gmail.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210506092951.515813-1-pbrobinson@gmail.com
      c0677e41
    • Yang Yingliang's avatar
      drm/rockchip: cdn-dp-core: add missing clk_disable_unprepare() on error in cdn_dp_grf_write() · ae41d925
      Yang Yingliang authored
      After calling clk_prepare_enable(), clk_disable_unprepare() need
      be called when calling regmap_write() failed.
      
      Fixes: 1a0f7ed3
      
       ("drm/rockchip: cdn-dp: add cdn DP support for rk3399")
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210519134928.2696617-1-yangyingliang@huawei.com
      ae41d925
    • Alex Bee's avatar
      drm: rockchip: set alpha_en to 0 if it is not used · 046e0db9
      Alex Bee authored
      alpha_en should be set to 0 if it is not used, i.e. to disable alpha
      blending if it was enabled before and should be disabled now.
      
      Fixes: 2aae8ed1
      
       ("drm/rockchip: Add per-pixel alpha support for the PX30 VOP")
      Signed-off-by: default avatarAlex Bee <knaerzche@gmail.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-6-knaerzche@gmail.com
      046e0db9
    • Alex Bee's avatar
      drm: rockchip: add alpha support for RK3036, RK3066, RK3126 and RK3188 · d099fa67
      Alex Bee authored
      With
      commit 2aae8ed1
      
       ("drm/rockchip: Add per-pixel alpha support for the PX30 VOP")
      alpha support was introduced for PX30's VOP.
      RK3036, RK3066, RK3126 and RK3188 VOPs support alpha blending in the
      same manner.
      With the exception of RK3066 all of them support pre-multiplied alpha.
      
      Signed-off-by: default avatarAlex Bee <knaerzche@gmail.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-5-knaerzche@gmail.com
      d099fa67
    • Alex Bee's avatar
      drm: rockchip: add missing registers for RK3066 · 742203cd
      Alex Bee authored
      
      
      Add dither_up, dsp_lut_en and data_blank registers to enable their
      respective functionality for RK3066's VOP.
      
      While at that also fix .rb_swap and .format registers for all windows,
      which have to be set though RK3066_SYS_CTRL1 register.
      Also remove .scl from win1: Scaling is only supported on the primary
      plane.
      
      Signed-off-by: default avatarAlex Bee <knaerzche@gmail.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-4-knaerzche@gmail.com
      742203cd
    • Alex Bee's avatar
      drm: rockchip: add missing registers for RK3188 · ab64b448
      Alex Bee authored
      
      
      Add dither_up, dsp_lut_en and data_blank registers to enable their
      respective functionality for RK3188's VOP.
      While at that also fix .dsp_blank register which is (only) set with
      BIT24 (same as RK3066)
      
      Signed-off-by: default avatarAlex Bee <knaerzche@gmail.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-3-knaerzche@gmail.com
      ab64b448
    • Alex Bee's avatar
      drm: rockchip: add scaling for RK3036 win1 · 53c2710c
      Alex Bee authored
      
      
      Add the registers needed to make scaling work on RK3036's win1.
      
      Signed-off-by: default avatarAlex Bee <knaerzche@gmail.com>
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-2-knaerzche@gmail.com
      53c2710c
  2. May 28, 2021
  3. May 27, 2021
  4. May 26, 2021
  5. May 25, 2021
    • Andrey Grodzovsky's avatar
      drm/amdgpu: Fix crash when hot unplug in BACO · e1543d83
      Andrey Grodzovsky authored
      
      
      Problem:
      When device goes into runtime suspend due to prolonged
      inactivity (e.g. BACO sleep) and then hot unplugged,
      PCI core will try to wake up the device as part of
      unplug process. Since the device is gone all HW
      programming during rpm resume fails leading
      to a bad SW state later during pci remove handling.
      
      Fix:
      Use a flag we use for PCIe error recovery to avoid
      accessing registres. This allows to successfully complete
      rpm resume sequence and finish pci remove.
      
      v2: Renamed HW access block flag
      
      Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1081
      Link: https://patchwork.freedesktop.org/patch/msgid/20210521204122.762288-2-andrey.grodzovsky@amd.com
      e1543d83
    • Andrey Grodzovsky's avatar
      drm/amdgpu: Rename flag which prevents HW access · 7afefb81
      Andrey Grodzovsky authored
      
      
      Make it's name not feature but function descriptive.
      
      Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210521204122.762288-1-andrey.grodzovsky@amd.com
      7afefb81
    • Paul Cercueil's avatar
      drm/ingenic: Add option to alloc cached GEM buffers · 4a791cb6
      Paul Cercueil authored
      
      
      Alloc GEM buffers backed by noncoherent memory on SoCs where it is
      actually faster than write-combine.
      
      This dramatically speeds up software rendering on these SoCs, even for
      tasks where write-combine memory should in theory be faster (e.g. simple
      blits).
      
      v3: The option is now selected per-SoC instead of being a module
          parameter.
      
      v5: - Fix drm_atomic_get_new_plane_state() used to retrieve the old
            state
          - Use custom drm_gem_fb_create()
          - Only check damage clips and sync DMA buffers if non-coherent
            buffers are used
      
      Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210523170415.90410-4-paul@crapouillou.net
      4a791cb6
    • Paul Cercueil's avatar
      drm: Add and export function drm_fb_cma_sync_non_coherent · b0906904
      Paul Cercueil authored
      
      
      This function can be used by drivers that use damage clips and have
      CMA GEM objects backed by non-coherent memory. Calling this function
      in a plane's .atomic_update ensures that all the data in the backing
      memory have been written to RAM.
      
      v3: - Only sync data if using GEM objects backed by non-coherent memory.
          - Use a drm_device pointer instead of device pointer in prototype
      
      v5: - Rename to drm_fb_cma_sync_non_coherent
          - Invert loops for better cache locality
          - Only sync BOs that have the non-coherent flag
          - Move to drm_fb_cma_helper.c to avoid circular dependency
      
      Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210523170415.90410-3-paul@crapouillou.net
      b0906904