]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Merge tag 'drm-next-2021-08-31-1' of git://anongit.freedesktop.org/drm/drm
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Sep 2021 18:26:46 +0000 (11:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Sep 2021 18:26:46 +0000 (11:26 -0700)
Pull drm updates from Dave Airlie:
 "Highlights:

   - i915 has seen a lot of refactoring and uAPI cleanups due to a
     change in the upstream direction going forward

     This has all been audited with known userspace, but there may be
     some pitfalls that were missed.

   - i915 now uses common TTM to enable discrete memory on DG1/2 GPUs

   - i915 enables Jasper and Elkhart Lake by default and has preliminary
     XeHP/DG2 support

   - amdgpu adds support for Cyan Skillfish

   - lots of implicit fencing rules documented and fixed up in drivers

   - msm now uses the core scheduler

   - the irq midlayer has been removed for non-legacy drivers

   - the sysfb code now works on more than x86.

  Otherwise the usual smattering of stuff everywhere, panels, bridges,
  refactorings.

  Detailed summary:

  core:
   - extract i915 eDP backlight into core
   - DP aux bus support
   - drm_device.irq_enabled removed
   - port drivers to native irq interfaces
   - export gem shadow plane handling for vgem
   - print proper driver name in framebuffer registration
   - driver fixes for implicit fencing rules
   - ARM fixed rate compression modifier added
   - updated fb damage handling
   - rmfb ioctl logging/docs
   - drop drm_gem_object_put_locked
   - define DRM_FORMAT_MAX_PLANES
   - add gem fb vmap/vunmap helpers
   - add lockdep_assert(once) helpers
   - mark drm irq midlayer as legacy
   - use offset adjusted bo mapping conversion

  vgaarb:
   - cleanups

  fbdev:
   - extend efifb handling to all arches
   - div by 0 fixes for multiple drivers

  udmabuf:
   - add hugepage mapping support

  dma-buf:
   - non-dynamic exporter fixups
   - document implicit fencing rules

  amdgpu:
   - Initial Cyan Skillfish support
   - switch virtual DCE over to vkms based atomic
   - VCN/JPEG power down fixes
   - NAVI PCIE link handling fixes
   - AMD HDMI freesync fixes
   - Yellow Carp + Beige Goby fixes
   - Clockgating/S0ix/SMU/EEPROM fixes
   - embed hw fence in job
   - rework dma-resv handling
   - ensure eviction to system ram

  amdkfd:
   - uapi: SVM address range query added
   - sysfs leak fix
   - GPUVM TLB optimizations
   - vmfault/migration counters

  i915:
   - Enable JSL and EHL by default
   - preliminary XeHP/DG2 support
   - remove all CNL support (never shipped)
   - move to TTM for discrete memory support
   - allow mixed object mmap handling
   - GEM uAPI spring cleaning
       - add I915_MMAP_OBJECT_FIXED
       - reinstate ADL-P mmap ioctls
       - drop a bunch of unused by userspace features
       - disable and remove GPU relocations
   - revert some i915 misfeatures
   - major refactoring of GuC for Gen11+
   - execbuffer object locking separate step
   - reject caching/set-domain on discrete
   - Enable pipe DMC loading on XE-LPD and ADL-P
   - add PSF GV point support
   - Refactor and fix DDI buffer translations
   - Clean up FBC CFB allocation code
   - Finish INTEL_GEN() and friends macro conversions

  nouveau:
   - add eDP backlight support
   - implicit fence fix

  msm:
   - a680/7c3 support
   - drm/scheduler conversion

  panfrost:
   - rework GPU reset

  virtio:
   - fix fencing for planes

  ast:
   - add detect support

  bochs:
   - move to tiny GPU driver

  vc4:
   - use hotplug irqs
   - HDMI codec support

  vmwgfx:
   - use internal vmware device headers

  ingenic:
   - demidlayering irq

  rcar-du:
   - shutdown fixes
   - convert to bridge connector helpers

  zynqmp-dsub:
   - misc fixes

  mgag200:
   - convert PLL handling to atomic

  mediatek:
   - MT8133 AAL support
   - gem mmap object support
   - MT8167 support

  etnaviv:
   - NXP Layerscape LS1028A SoC support
   - GEM mmap cleanups

  tegra:
   - new user API

  exynos:
   - missing unlock fix
   - build warning fix
   - use refcount_t"

* tag 'drm-next-2021-08-31-1' of git://anongit.freedesktop.org/drm/drm: (1318 commits)
  drm/amd/display: Move AllowDRAMSelfRefreshOrDRAMClockChangeInVblank to bounding box
  drm/amd/display: Remove duplicate dml init
  drm/amd/display: Update bounding box states (v2)
  drm/amd/display: Update number of DCN3 clock states
  drm/amdgpu: disable GFX CGCG in aldebaran
  drm/amdgpu: Clear RAS interrupt status on aldebaran
  drm/amdgpu: Add support for RAS XGMI err query
  drm/amdkfd: Account for SH/SE count when setting up cu masks.
  drm/amdgpu: rename amdgpu_bo_get_preferred_pin_domain
  drm/amdgpu: drop redundant cancel_delayed_work_sync call
  drm/amdgpu: add missing cleanups for more ASICs on UVD/VCE suspend
  drm/amdgpu: add missing cleanups for Polaris12 UVD/VCE on suspend
  drm/amdkfd: map SVM range with correct access permission
  drm/amdkfd: check access permisson to restore retry fault
  drm/amdgpu: Update RAS XGMI Error Query
  drm/amdgpu: Add driver infrastructure for MCA RAS
  drm/amd/display: Add Logging for HDMI color depth information
  drm/amd/amdgpu: consolidate PSP TA init shared buf functions
  drm/amd/amdgpu: add name field back to ras_common_if
  drm/amdgpu: Fix build with missing pm_suspend_target_state module export
  ...

24 files changed:
1  2 
Documentation/devicetree/bindings/vendor-prefixes.yaml
MAINTAINERS
arch/x86/Kconfig
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display_power.c
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/imx/ipuv3-plane.c
drivers/gpu/drm/kmb/kmb_drv.c
drivers/gpu/drm/mediatek/mtk_disp_aal.c
drivers/gpu/drm/mediatek/mtk_dpi.c
drivers/gpu/drm/mediatek/mtk_drm_crtc.c
drivers/gpu/drm/mediatek/mtk_drm_plane.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
drivers/gpu/drm/msm/dp/dp_catalog.c
drivers/gpu/drm/msm/dp/dp_display.c
drivers/gpu/drm/nouveau/dispnv50/disp.c
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/panel/panel-simple.c

diff --cc MAINTAINERS
Simple merge
Simple merge
index 38222de921d159d19dea6b0d9e09b5624ee9e8f7,194590252bb952d36347626b95eb40977d5a2236..9dc3b2d8817688281ec5f7c82d34993b1545d9ad
@@@ -92,13 -112,26 +112,30 @@@ static bool __get_eeprom_i2c_addr_arct(
  }
  
  static bool __get_eeprom_i2c_addr(struct amdgpu_device *adev,
-                                 uint16_t *i2c_addr)
+                                 struct amdgpu_ras_eeprom_control *control)
  {
-       if (!i2c_addr)
++      uint8_t ras_rom_i2c_slave_addr;
++
+       if (!control)
                return false;
  
-       if (amdgpu_atomfirmware_ras_rom_addr(adev, (uint8_t*)i2c_addr))
-               return true;
+       control->i2c_address = 0;
 -      if (amdgpu_atomfirmware_ras_rom_addr(adev, (uint8_t*)&control->i2c_address))
++      if (amdgpu_atomfirmware_ras_rom_addr(adev, &ras_rom_i2c_slave_addr))
+       {
 -              if (control->i2c_address == 0xA0)
++              switch (ras_rom_i2c_slave_addr) {
++              case 0xA0:
+                       control->i2c_address = 0;
 -              else if (control->i2c_address == 0xA8)
++                      return true;
++              case 0xA8:
+                       control->i2c_address = 0x40000;
 -              else {
 -                      dev_warn(adev->dev, "RAS EEPROM I2C address not supported");
++                      return true;
++              default:
++                      dev_warn(adev->dev, "RAS EEPROM I2C slave address %02x not supported",
++                               ras_rom_i2c_slave_addr);
+                       return false;
+               }
 -
 -              return true;
+       }
  
        switch (adev->asic_type) {
        case CHIP_VEGA20:
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 0000000000000000000000000000000000000000,64b45284766a19dbc02e83e11d1260a8669b534a..f46d4ab73d6a681feb200a066daa93339fae09b4
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,167 +1,169 @@@
+ // SPDX-License-Identifier: GPL-2.0-only
+ /*
+  * Copyright (c) 2021 MediaTek Inc.
+  */
+ #include <linux/clk.h>
+ #include <linux/component.h>
+ #include <linux/module.h>
+ #include <linux/of_device.h>
+ #include <linux/of_irq.h>
+ #include <linux/platform_device.h>
+ #include <linux/soc/mediatek/mtk-cmdq.h>
+ #include "mtk_disp_drv.h"
+ #include "mtk_drm_crtc.h"
+ #include "mtk_drm_ddp_comp.h"
+ #define DISP_AAL_EN                           0x0000
+ #define AAL_EN                                                BIT(0)
+ #define DISP_AAL_SIZE                         0x0030
++#define DISP_AAL_OUTPUT_SIZE                  0x04d8
+ struct mtk_disp_aal_data {
+       bool has_gamma;
+ };
+ /**
+  * struct mtk_disp_aal - DISP_AAL driver structure
+  * @ddp_comp - structure containing type enum and hardware resources
+  * @crtc - associated crtc to report irq events to
+  */
+ struct mtk_disp_aal {
+       struct clk *clk;
+       void __iomem *regs;
+       struct cmdq_client_reg cmdq_reg;
+       const struct mtk_disp_aal_data *data;
+ };
+ int mtk_aal_clk_enable(struct device *dev)
+ {
+       struct mtk_disp_aal *aal = dev_get_drvdata(dev);
+       return clk_prepare_enable(aal->clk);
+ }
+ void mtk_aal_clk_disable(struct device *dev)
+ {
+       struct mtk_disp_aal *aal = dev_get_drvdata(dev);
+       clk_disable_unprepare(aal->clk);
+ }
+ void mtk_aal_config(struct device *dev, unsigned int w,
+                          unsigned int h, unsigned int vrefresh,
+                          unsigned int bpc, struct cmdq_pkt *cmdq_pkt)
+ {
+       struct mtk_disp_aal *aal = dev_get_drvdata(dev);
+       mtk_ddp_write(cmdq_pkt, w << 16 | h, &aal->cmdq_reg, aal->regs, DISP_AAL_SIZE);
++      mtk_ddp_write(cmdq_pkt, w << 16 | h, &aal->cmdq_reg, aal->regs, DISP_AAL_OUTPUT_SIZE);
+ }
+ void mtk_aal_gamma_set(struct device *dev, struct drm_crtc_state *state)
+ {
+       struct mtk_disp_aal *aal = dev_get_drvdata(dev);
+       if (aal->data && aal->data->has_gamma)
+               mtk_gamma_set_common(aal->regs, state);
+ }
+ void mtk_aal_start(struct device *dev)
+ {
+       struct mtk_disp_aal *aal = dev_get_drvdata(dev);
+       writel(AAL_EN, aal->regs + DISP_AAL_EN);
+ }
+ void mtk_aal_stop(struct device *dev)
+ {
+       struct mtk_disp_aal *aal = dev_get_drvdata(dev);
+       writel_relaxed(0x0, aal->regs + DISP_AAL_EN);
+ }
+ static int mtk_disp_aal_bind(struct device *dev, struct device *master,
+                              void *data)
+ {
+       return 0;
+ }
+ static void mtk_disp_aal_unbind(struct device *dev, struct device *master,
+                                 void *data)
+ {
+ }
+ static const struct component_ops mtk_disp_aal_component_ops = {
+       .bind   = mtk_disp_aal_bind,
+       .unbind = mtk_disp_aal_unbind,
+ };
+ static int mtk_disp_aal_probe(struct platform_device *pdev)
+ {
+       struct device *dev = &pdev->dev;
+       struct mtk_disp_aal *priv;
+       struct resource *res;
+       int ret;
+       priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
+       if (!priv)
+               return -ENOMEM;
+       priv->clk = devm_clk_get(dev, NULL);
+       if (IS_ERR(priv->clk)) {
+               dev_err(dev, "failed to get aal clk\n");
+               return PTR_ERR(priv->clk);
+       }
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       priv->regs = devm_ioremap_resource(dev, res);
+       if (IS_ERR(priv->regs)) {
+               dev_err(dev, "failed to ioremap aal\n");
+               return PTR_ERR(priv->regs);
+       }
+ #if IS_REACHABLE(CONFIG_MTK_CMDQ)
+       ret = cmdq_dev_get_client_reg(dev, &priv->cmdq_reg, 0);
+       if (ret)
+               dev_dbg(dev, "get mediatek,gce-client-reg fail!\n");
+ #endif
+       priv->data = of_device_get_match_data(dev);
+       platform_set_drvdata(pdev, priv);
+       ret = component_add(dev, &mtk_disp_aal_component_ops);
+       if (ret)
+               dev_err(dev, "Failed to add component: %d\n", ret);
+       return ret;
+ }
+ static int mtk_disp_aal_remove(struct platform_device *pdev)
+ {
+       component_del(&pdev->dev, &mtk_disp_aal_component_ops);
+       return 0;
+ }
+ static const struct mtk_disp_aal_data mt8173_aal_driver_data = {
+       .has_gamma = true,
+ };
+ static const struct of_device_id mtk_disp_aal_driver_dt_match[] = {
+       { .compatible = "mediatek,mt8173-disp-aal",
+         .data = &mt8173_aal_driver_data},
+       { .compatible = "mediatek,mt8183-disp-aal"},
+       {},
+ };
+ MODULE_DEVICE_TABLE(of, mtk_disp_aal_driver_dt_match);
+ struct platform_driver mtk_disp_aal_driver = {
+       .probe          = mtk_disp_aal_probe,
+       .remove         = mtk_disp_aal_remove,
+       .driver         = {
+               .name   = "mediatek-disp-aal",
+               .owner  = THIS_MODULE,
+               .of_match_table = mtk_disp_aal_driver_dt_match,
+       },
+ };
Simple merge
Simple merge
index 867388a399adf2566734241512ae50d25faf6c29,419fd4a14cbfaa4261e9b62c554f59107c2e29ec..fbe4c2cd52a3d9e2cc947801b206c05b1297268f
@@@ -1312,9 -1314,9 +1315,12 @@@ static int dp_pm_resume(struct device *
        else
                dp->dp_display.is_connected = false;
  
 +      dp_display_handle_plugged_change(g_dp_display,
 +                              dp->dp_display.is_connected);
 +
+       DRM_DEBUG_DP("After, sink_count=%d is_connected=%d core_inited=%d power_on=%d\n",
+                       dp->link->sink_count, dp->dp_display.is_connected,
+                       dp->core_initialized, dp_display->power_on);
  
        mutex_unlock(&dp->event_mutex);
  
Simple merge
Simple merge