]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge tag 'drm-next-2019-07-16' of git://anongit.freedesktop.org/drm/drm
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 16 Jul 2019 02:04:27 +0000 (19:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 16 Jul 2019 02:04:27 +0000 (19:04 -0700)
Pull drm updates from Dave Airlie:
 "The biggest thing in this is the AMD Navi GPU support, this again
  contains a bunch of header files that are large. These are the new AMD
  RX5700 GPUs that just recently became available.

  New drivers:
   - ST-Ericsson MCDE driver
   - Ingenic JZ47xx SoC

  UAPI change:
   - HDR source metadata property

  Core:
   - HDR inforframes and EDID parsing
   - drm hdmi infoframe unpacking
   - remove prime sg_table caching into dma-buf
   - New gem vram helpers to reduce driver code
   - Lots of drmP.h removal
   - reservation fencing fix
   - documentation updates
   - drm_fb_helper_connector removed
   - mode name command handler rewrite

  fbcon:
   - Remove the fbcon notifiers

  ttm:
   - forward progress fixes

  dma-buf:
   - make mmap call optional
   - debugfs refcount fixes
   - dma-fence free with pending signals fix
   - each dma-buf gets an inode

  Panels:
   - Lots of additional panel bindings

  amdgpu:
   - initial navi10 support
   - avoid hw reset
   - HDR metadata support
   - new thermal sensors for vega asics
   - RAS fixes
   - use HMM rather than MMU notifier
   - xgmi topology via kfd
   - SR-IOV fixes
   - driver reload fixes
   - DC use a core bpc attribute
   - Aux fixes for DC
   - Bandwidth calc updates for DC
   - Clock handling refactor
   - kfd VEGAM support

  vmwgfx:
   - Coherent memory support changes

  i915:
   - HDR Support
   - HDMI i2c link
   - Icelake multi-segmented gamma support
   - GuC firmware update
   - Mule Creek Canyon PCH support for EHL
   - EHL platform updtes
   - move i915.alpha_support to i915.force_probe
   - runtime PM refactoring
   - VBT parsing refactoring
   - DSI fixes
   - struct mutex dependency reduction
   - GEM code reorg

  mali-dp:
   - Komeda driver features

  msm:
   - dsi vs EPROBE_DEFER fixes
   - msm8998 snapdragon 835 support
   - a540 gpu support
   - mdp5 and dpu interconnect support

  exynos:
   - drmP.h removal

  tegra:
   - misc fixes

  tda998x:
   - audio support improvements
   - pixel repeated mode support
   - quantisation range handling corrections
   - HDMI vendor info fix

  armada:
   - interlace support fix
   - overlay/video plane register handling refactor
   - add gamma support

  rockchip:
   - RX3328 support

  panfrost:
   - expose perf counters via hidden ioctls

  vkms:
   - enumerate CRC sources list

  ast:
   - rework BO handling

  mgag200:
   - rework BO handling

  dw-hdmi:
   - suspend/resume support

  rcar-du:
   - R8A774A1 Soc Support
   - LVDS dual-link mode support
   - Additional formats
   - Misc fixes

  omapdrm:
   - DSI command mode display support

  stm
   - fb modifier support
   - runtime PM support

  sun4i:
   - use vmap ops

  vc4:
   - binner bo binding rework

  v3d:
   - compute shader support
   - resync/sync fixes
   - job management refactoring

  lima:
   - NULL pointer in irq handler fix
   - scheduler default timeout

  virtio:
   - fence seqno support
   - trace events

  bochs:
   - misc fixes

  tc458767:
   - IRQ/HDP handling

  sii902x:
   - HDMI audio support

  atmel-hlcdc:
   - misc fixes

  meson:
   - zpos support"

* tag 'drm-next-2019-07-16' of git://anongit.freedesktop.org/drm/drm: (1815 commits)
  Revert "Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next"
  Revert "mm: adjust apply_to_pfn_range interface for dropped token."
  mm: adjust apply_to_pfn_range interface for dropped token.
  drm/amdgpu/navi10: add uclk activity sensor
  drm/amdgpu: properly guard the generic discovery code
  drm/amdgpu: add missing documentation on new module parameters
  drm/amdgpu: don't invalidate caches in RELEASE_MEM, only do the writeback
  drm/amd/display: avoid 64-bit division
  drm/amdgpu/psp11: simplify the ucode register logic
  drm/amdgpu: properly guard DC support in navi code
  drm/amd/powerplay: vega20: fix uninitialized variable use
  drm/amd/display: dcn20: include linux/delay.h
  amdgpu: make pmu support optional
  drm/amd/powerplay: Zero initialize current_rpm in vega20_get_fan_speed_percent
  drm/amd/powerplay: Zero initialize freq in smu_v11_0_get_current_clk_freq
  drm/amd/powerplay: Use memset to initialize metrics structs
  drm/amdgpu/mes10.1: Fix header guard
  drm/amd/powerplay: add temperature sensor support for navi10
  drm/amdgpu: fix scheduler timeout calc
  drm/amdgpu: Prepare for hmm_range_register API change (v2)
  ...

99 files changed:
1  2 
Documentation/devicetree/bindings/vendor-prefixes.yaml
Documentation/fb/modedb.rst
MAINTAINERS
drivers/dma-buf/dma-buf.c
drivers/gpu/drm/Kconfig
drivers/gpu/drm/amd/amdgpu/Kconfig
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/armada/armada_510.c
drivers/gpu/drm/armada/armada_crtc.c
drivers/gpu/drm/armada/armada_crtc.h
drivers/gpu/drm/armada/armada_debugfs.c
drivers/gpu/drm/armada/armada_drm.h
drivers/gpu/drm/armada/armada_drv.c
drivers/gpu/drm/armada/armada_fb.c
drivers/gpu/drm/armada/armada_hw.h
drivers/gpu/drm/armada/armada_overlay.c
drivers/gpu/drm/armada/armada_plane.c
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
drivers/gpu/drm/bridge/ti-tfp410.c
drivers/gpu/drm/drm_bufs.c
drivers/gpu/drm/drm_ioc32.c
drivers/gpu/drm/exynos/exynos_drm_dpi.c
drivers/gpu/drm/exynos/exynos_drm_dsi.c
drivers/gpu/drm/i2c/tda998x_drv.c
drivers/gpu/drm/i915/Makefile.header-test
drivers/gpu/drm/msm/adreno/a3xx_gpu.c
drivers/gpu/drm/msm/adreno/adreno_device.c
drivers/gpu/drm/msm/adreno/adreno_gpu.c
drivers/gpu/drm/msm/adreno/adreno_gpu.h
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_drv.h
drivers/gpu/drm/msm/msm_fb.c
drivers/gpu/drm/msm/msm_gem.c
drivers/gpu/drm/msm/msm_gem.h
drivers/gpu/drm/msm/msm_gem_submit.c
drivers/gpu/drm/msm/msm_gpu.c
drivers/gpu/drm/msm/msm_iommu.c
drivers/gpu/drm/msm/msm_perf.c
drivers/gpu/drm/msm/msm_rd.c
drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
drivers/gpu/drm/omapdrm/dss/omapdss-boot-init.c
drivers/gpu/drm/omapdrm/omap_crtc.c
drivers/gpu/drm/omapdrm/omap_crtc.h
drivers/gpu/drm/omapdrm/omap_drv.c
drivers/gpu/drm/omapdrm/omap_drv.h
drivers/gpu/drm/omapdrm/omap_fb.c
drivers/gpu/drm/omapdrm/omap_irq.c
drivers/gpu/drm/omapdrm/omap_irq.h
drivers/gpu/drm/panel/panel-ilitek-ili9322.c
drivers/gpu/drm/panel/panel-jdi-lt070me05000.c
drivers/gpu/drm/panel/panel-lg-lg4573.c
drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
drivers/gpu/drm/panel/panel-samsung-ld9040.c
drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c
drivers/gpu/drm/panel/panel-samsung-s6e63j0x03.c
drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c
drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c
drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c
drivers/gpu/drm/panel/panel-sitronix-st7789v.c
drivers/gpu/drm/panfrost/panfrost_drv.c
drivers/gpu/drm/panfrost/panfrost_gem.c
drivers/gpu/drm/tegra/dc.c
drivers/gpu/drm/tegra/dpaux.c
drivers/gpu/drm/tegra/drm.h
drivers/gpu/drm/tegra/fb.c
drivers/gpu/drm/tegra/output.c
drivers/gpu/drm/vc4/vc4_bo.c
drivers/gpu/drm/vc4/vc4_debugfs.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_hdmi.c
drivers/gpu/drm/vc4/vc4_plane.c
drivers/gpu/drm/vc4/vc4_v3d.c
drivers/gpu/drm/virtio/virtgpu_vq.c
drivers/gpu/drm/zte/zx_plane.c
drivers/gpu/ipu-v3/ipu-image-convert.c
drivers/misc/mei/hdcp/mei_hdcp.c
drivers/staging/media/imx/imx-ic-prp.c
drivers/staging/media/imx/imx-ic-prpencvf.c
drivers/staging/media/imx/imx-media-csi.c
drivers/staging/media/imx/imx-media-utils.c
drivers/staging/media/imx/imx-media-vdic.c
drivers/staging/media/imx/imx-media.h
drivers/staging/media/imx/imx7-media-csi.c
include/linux/dma-buf.h

index 3c2397293977215eea59bfb593c36ef8d582233c,1dd5a52f9390fe85dfeae72c2722fc3759939799..9c4e3fd39e6d2dcf37364f28e24d702c0e9fd05a
@@@ -45,18 -45,29 +45,32 @@@ signals (e.g. HDMI and DVI-I). For othe
  is specified the output is disabled.
  
  You can additionally specify which output the options matches to.
 -To force the VGA output to be enabled and drive a specific mode say:
 +To force the VGA output to be enabled and drive a specific mode say::
 +
      video=VGA-1:1280x1024@60me
  
 -Specifying the option multiple times for different ports is possible, e.g.:
 +Specifying the option multiple times for different ports is possible, e.g.::
 +
      video=LVDS-1:d video=HDMI-1:D
  
 -Valid options are:
+ Options can also be passed after the mode, using commas as separator.
+        Sample usage: 720x480,rotate=180 - 720x480 mode, rotated by 180 degrees
 -***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo *****
++Valid options are::
+   - margin_top, margin_bottom, margin_left, margin_right (integer):
+     Number of pixels in the margins, typically to deal with overscan on TVs
+   - reflect_x (boolean): Perform an axial symmetry on the X axis
+   - reflect_y (boolean): Perform an axial symmetry on the Y axis
+   - rotate (integer): Rotate the initial framebuffer by x
+     degrees. Valid values are 0, 90, 180 and 270.
 +-----------------------------------------------------------------------------
  
  What is the VESA(TM) Coordinated Video Timings (CVT)?
 +=====================================================
  
  From the VESA(TM) Website:
  
diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
index 844f0a16298117154b7af495c891ecb7a8f892d8,a04f2fc7bf3717d1e07c9d7eada809c9e3338273..f6e5c0282fc1f4fdb46a7dd1c3134f6d47447bf3
@@@ -27,10 -27,11 +27,10 @@@ config DRM_AMDGPU_CI
  config DRM_AMDGPU_USERPTR
        bool "Always enable userptr write support"
        depends on DRM_AMDGPU
-       select MMU_NOTIFIER
 -      depends on ARCH_HAS_HMM
 -      select HMM_MIRROR
++      depends on HMM_MIRROR
        help
-         This option selects CONFIG_MMU_NOTIFIER if it isn't already
-         selected to enabled full userptr support.
+         This option selects CONFIG_HMM and CONFIG_HMM_MIRROR if it
+         isn't already selected to enabled full userptr support.
  
  config DRM_AMDGPU_GART_DEBUGFS
        bool "Allow GART access through debugfs"
index 0c52d1f9fe0fc85005cf9c72c1a6602a1d685317,333cfbdf6dd09e48f9e867650acc19565fba88c0..5c05644b9b96a802d6c2699b4af631e85ea0e7a2
@@@ -739,62 -748,95 +748,95 @@@ int amdgpu_ttm_tt_get_user_pages(struc
        if (!mm) /* Happens during process shutdown */
                return -ESRCH;
  
-       if (!(gtt->userflags & AMDGPU_GEM_USERPTR_READONLY))
-               flags |= FOLL_WRITE;
+       if (unlikely(!mirror)) {
+               DRM_DEBUG_DRIVER("Failed to get hmm_mirror\n");
+               r = -EFAULT;
+               goto out;
+       }
  
-       down_read(&mm->mmap_sem);
+       vma = find_vma(mm, start);
+       if (unlikely(!vma || start < vma->vm_start)) {
+               r = -EFAULT;
+               goto out;
+       }
+       if (unlikely((gtt->userflags & AMDGPU_GEM_USERPTR_ANONONLY) &&
+               vma->vm_file)) {
+               r = -EPERM;
+               goto out;
+       }
  
-       if (gtt->userflags & AMDGPU_GEM_USERPTR_ANONONLY) {
-               /*
-                * check that we only use anonymous memory to prevent problems
-                * with writeback
-                */
-               unsigned long end = gtt->userptr + ttm->num_pages * PAGE_SIZE;
-               struct vm_area_struct *vma;
+       range = kzalloc(sizeof(*range), GFP_KERNEL);
+       if (unlikely(!range)) {
+               r = -ENOMEM;
+               goto out;
+       }
  
-               vma = find_vma(mm, gtt->userptr);
-               if (!vma || vma->vm_file || vma->vm_end < end) {
-                       up_read(&mm->mmap_sem);
-                       return -EPERM;
-               }
+       pfns = kvmalloc_array(ttm->num_pages, sizeof(*pfns), GFP_KERNEL);
+       if (unlikely(!pfns)) {
+               r = -ENOMEM;
+               goto out_free_ranges;
        }
  
-       /* loop enough times using contiguous pages of memory */
-       do {
-               unsigned num_pages = ttm->num_pages - pinned;
-               uint64_t userptr = gtt->userptr + pinned * PAGE_SIZE;
-               struct page **p = pages + pinned;
-               struct amdgpu_ttm_gup_task_list guptask;
+       amdgpu_hmm_init_range(range);
+       range->default_flags = range->flags[HMM_PFN_VALID];
+       range->default_flags |= amdgpu_ttm_tt_is_readonly(ttm) ?
+                               0 : range->flags[HMM_PFN_WRITE];
+       range->pfn_flags_mask = 0;
+       range->pfns = pfns;
 -      hmm_range_register(range, mm, start,
++      hmm_range_register(range, mirror, start,
+                          start + ttm->num_pages * PAGE_SIZE, PAGE_SHIFT);
  
-               guptask.task = current;
-               spin_lock(&gtt->guptasklock);
-               list_add(&guptask.list, &gtt->guptasks);
-               spin_unlock(&gtt->guptasklock);
+ retry:
+       /*
+        * Just wait for range to be valid, safe to ignore return value as we
+        * will use the return value of hmm_range_fault() below under the
+        * mmap_sem to ascertain the validity of the range.
+        */
+       hmm_range_wait_until_valid(range, HMM_RANGE_DEFAULT_TIMEOUT);
  
-               if (mm == current->mm)
-                       r = get_user_pages(userptr, num_pages, flags, p, NULL);
-               else
-                       r = get_user_pages_remote(gtt->usertask,
-                                       mm, userptr, num_pages,
-                                       flags, p, NULL, NULL);
+       down_read(&mm->mmap_sem);
  
-               spin_lock(&gtt->guptasklock);
-               list_del(&guptask.list);
-               spin_unlock(&gtt->guptasklock);
+       r = hmm_range_fault(range, true);
+       if (unlikely(r < 0)) {
+               if (likely(r == -EAGAIN)) {
+                       /*
+                        * return -EAGAIN, mmap_sem is dropped
+                        */
+                       if (retry++ < MAX_RETRY_HMM_RANGE_FAULT)
+                               goto retry;
+                       else
+                               pr_err("Retry hmm fault too many times\n");
+               }
  
-               if (r < 0)
-                       goto release_pages;
+               goto out_up_read;
+       }
  
-               pinned += r;
+       up_read(&mm->mmap_sem);
  
-       } while (pinned < ttm->num_pages);
+       for (i = 0; i < ttm->num_pages; i++) {
+               pages[i] = hmm_device_entry_to_page(range, pfns[i]);
+               if (unlikely(!pages[i])) {
+                       pr_err("Page fault failed for pfn[%lu] = 0x%llx\n",
+                              i, pfns[i]);
+                       r = -ENOMEM;
+                       goto out_free_pfns;
+               }
+       }
+       gtt->range = range;
  
-       up_read(&mm->mmap_sem);
        return 0;
  
- release_pages:
-       release_pages(pages, pinned);
-       up_read(&mm->mmap_sem);
+ out_up_read:
+       if (likely(r != -EAGAIN))
+               up_read(&mm->mmap_sem);
+ out_free_pfns:
+       hmm_range_unregister(range);
+       kvfree(pfns);
+ out_free_ranges:
+       kfree(range);
+ out:
        return r;
  }
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index d6a4bbff0c15119ba8b89d4f576e5c38a97c310f,87289db128687f35438094cda1c3b89c6432ead8..3cebb19ec1c47cfdf80ff059f2ac6d6b1651006f
@@@ -5,16 -4,20 +5,16 @@@
   * Copyright (c) 2014 Samsung Electronics Co., Ltd
   *
   * Contacts: Andrzej Hajda <a.hajda@samsung.com>
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
  */
  
- #include <drm/drmP.h>
+ #include <linux/of_graph.h>
+ #include <linux/regulator/consumer.h>
  #include <drm/drm_atomic_helper.h>
  #include <drm/drm_panel.h>
+ #include <drm/drm_print.h>
  #include <drm/drm_probe_helper.h>
  
- #include <linux/of_graph.h>
- #include <linux/regulator/consumer.h>
  #include <video/of_videomode.h>
  #include <video/videomode.h>
  
index 8f62581e2d0fc802ca74970d8304bcea1907acd6,5f6f523821a22b864b374d5a9864c5486574a314..6926cee91b367963ba1571e33efc659093fa6bb6
@@@ -5,18 -4,15 +5,11 @@@
   * Copyright (c) 2014 Samsung Electronics Co., Ltd
   *
   * Contacts: Tomasz Figa <t.figa@samsung.com>
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
  */
  
- #include <asm/unaligned.h>
- #include <drm/drmP.h>
- #include <drm/drm_atomic_helper.h>
- #include <drm/drm_fb_helper.h>
- #include <drm/drm_mipi_dsi.h>
- #include <drm/drm_panel.h>
- #include <drm/drm_probe_helper.h>
  #include <linux/clk.h>
+ #include <linux/delay.h>
+ #include <linux/component.h>
  #include <linux/gpio/consumer.h>
  #include <linux/irq.h>
  #include <linux/of_device.h>
Simple merge
index 639b596a06a9d06ec01f97e1fb3d28e854174f81,e6ba66f787f99217adfe5d82ddbf57ecd7951af6..7cde0ec3461559c99a6ba7b51922445963f27b68
@@@ -2,36 -2,31 +2,21 @@@
  # Copyright Â© 2019 Intel Corporation
  
  # Test the headers are compilable as standalone units
 -header_test := \
 +header-test-$(CONFIG_DRM_I915_WERROR) := \
        i915_active_types.h \
-       i915_gem_context_types.h \
+       i915_debugfs.h \
+       i915_drv.h \
+       i915_irq.h \
+       i915_params.h \
        i915_priolist_types.h \
+       i915_reg.h \
        i915_scheduler_types.h \
        i915_timeline_types.h \
-       intel_atomic_plane.h \
-       intel_audio.h \
-       intel_cdclk.h \
-       intel_color.h \
-       intel_connector.h \
-       intel_context_types.h \
-       intel_crt.h \
+       i915_utils.h \
        intel_csr.h \
-       intel_ddi.h \
-       intel_dp.h \
-       intel_dvo.h \
-       intel_engine_types.h \
-       intel_fbc.h \
-       intel_fbdev.h \
-       intel_frontbuffer.h \
-       intel_hdcp.h \
-       intel_hdmi.h \
-       intel_lspcon.h \
-       intel_lvds.h \
-       intel_panel.h \
-       intel_pipe_crc.h \
+       intel_drv.h \
        intel_pm.h \
-       intel_psr.h \
-       intel_sdvo.h \
-       intel_sprite.h \
-       intel_tv.h \
-       intel_workarounds_types.h
+       intel_runtime_pm.h \
+       intel_sideband.h \
+       intel_uncore.h \
+       intel_wakeref.h
 -
 -quiet_cmd_header_test = HDRTEST $@
 -      cmd_header_test = echo "\#include \"$(<F)\"" > $@
 -
 -header_test_%.c: %.h
 -      $(call cmd,header_test)
 -
 -i915-$(CONFIG_DRM_I915_WERROR) += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.o,$(h)))
 -
 -clean-files += $(foreach h,$(header_test),$(patsubst %.h,header_test_%.c,$(h)))
Simple merge
index 894b93b59c9f10d887472eff47e0746bca0c448b,2d46d1126283be505aac093c95cd3acf33298b60..e3010f0233716ccf6b19e1d9bd042773d2de731c
@@@ -2,8 -1,21 +2,9 @@@
  /*
   * Copyright (C) 2013 Red Hat
   * Author: Rob Clark <robdclark@gmail.com>
 - *
 - * This program is free software; you can redistribute it and/or modify it
 - * under the terms of the GNU General Public License version 2 as published by
 - * the Free Software Foundation.
 - *
 - * This program is distributed in the hope that it will be useful, but WITHOUT
 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 - * more details.
 - *
 - * You should have received a copy of the GNU General Public License along with
 - * this program.  If not, see <http://www.gnu.org/licenses/>.
   */
  
+ #include <drm/drm_damage_helper.h>
  #include "mdp4_kms.h"
  
  #define DOWN_SCALE_MAX        8
index 901009e1f219c58924f35fb8fc2831edafb05f77,1c55401956c493fdd826c996522461b0f9b6801c..4a60f5fca6b0bdc90d0fdf758c9196a26381120a
@@@ -3,8 -2,21 +3,9 @@@
   * Copyright (c) 2014, The Linux Foundation. All rights reserved.
   * Copyright (C) 2013 Red Hat
   * Author: Rob Clark <robdclark@gmail.com>
 - *
 - * This program is free software; you can redistribute it and/or modify it
 - * under the terms of the GNU General Public License version 2 as published by
 - * the Free Software Foundation.
 - *
 - * This program is distributed in the hope that it will be useful, but WITHOUT
 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 - * more details.
 - *
 - * You should have received a copy of the GNU General Public License along with
 - * this program.  If not, see <http://www.gnu.org/licenses/>.
   */
  
+ #include <linux/interconnect.h>
  #include <linux/of_irq.h>
  
  #include "msm_drv.h"
index d6bb468ab2c8f1b543a58cb96ae740dea5aac8b7,91609bde033a919f34257f6a36011e588f58987e..c7e6725693ea3cba9b247d666aff8c191ece6bb5
@@@ -3,8 -2,21 +3,9 @@@
   * Copyright (C) 2014-2015 The Linux Foundation. All rights reserved.
   * Copyright (C) 2013 Red Hat
   * Author: Rob Clark <robdclark@gmail.com>
 - *
 - * This program is free software; you can redistribute it and/or modify it
 - * under the terms of the GNU General Public License version 2 as published by
 - * the Free Software Foundation.
 - *
 - * This program is distributed in the hope that it will be useful, but WITHOUT
 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 - * more details.
 - *
 - * You should have received a copy of the GNU General Public License along with
 - * this program.  If not, see <http://www.gnu.org/licenses/>.
   */
  
+ #include <drm/drm_damage_helper.h>
  #include <drm/drm_print.h>
  #include "mdp5_kms.h"
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index cc2c9981a388747fcbf1b8f8ea8415afb24b88fd,35a4bd05edf51d5d0a652460e253a61a5785df4f..53dd1e12879530d31fb93d63b793f9bbeb81ccc0
   *
   * Copyright (C) 2017 Linus Walleij <linus.walleij@linaro.org>
   * Derived from drivers/drm/gpu/panel/panel-samsung-ld9040.c
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
   */
  
- #include <drm/drmP.h>
- #include <drm/drm_panel.h>
- #include <linux/of_device.h>
  #include <linux/bitops.h>
  #include <linux/gpio/consumer.h>
  #include <linux/module.h>
index 04c3a7963c4a6e596b28397afc0ce703082d036f,ee5ddf771e1009e8c5d12e35421abfba5dcf9f71..ff3e89e61e3fc44c101b52dfbf8512b785e422d2
@@@ -9,8 -8,22 +9,10 @@@
   * From internet archives, the panel for Nexus 7 2nd Gen, 2013 model is a
   * JDI model LT070ME05000, and its data sheet is at:
   * http://panelone.net/en/7-0-inch/JDI_LT070ME05000_7.0_inch-datasheet
 - *
 - * This program is free software; you can redistribute it and/or modify it
 - * under the terms of the GNU General Public License version 2 as published by
 - * the Free Software Foundation.
 - *
 - * This program is distributed in the hope that it will be useful, but WITHOUT
 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 - * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 - * more details.
 - *
 - * You should have received a copy of the GNU General Public License along with
 - * this program.  If not, see <http://www.gnu.org/licenses/>.
   */
  #include <linux/backlight.h>
+ #include <linux/delay.h>
  #include <linux/gpio/consumer.h>
  #include <linux/module.h>
  #include <linux/of.h>
index ccbd24d32623d72df60f24166f296d0a479982d7,0dd4bdda7c4e7f89d1566d8f9e774bd75325a395..41bf02d122a1f581e2cc6c3431a0e13d4529eed4
   * Derived from drivers/video/backlight/ld9040.c
   *
   * Andrzej Hajda <a.hajda@samsung.com>
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
  */
  
- #include <drm/drmP.h>
- #include <drm/drm_panel.h>
+ #include <linux/delay.h>
  #include <linux/gpio/consumer.h>
+ #include <linux/module.h>
  #include <linux/regulator/consumer.h>
  #include <linux/spi/spi.h>
  
index 1a42983b4ce4f6b6fb21ef74dfbbe2ed67c062c0,5c2a1cae603b4c4a6181e290becf57213a680e6d..3be902dcedc02254788c2060cf3c2515a5c2ee87
@@@ -6,12 -5,16 +6,12 @@@
   * Derived from drivers/video/backlight/ld9040.c
   *
   * Andrzej Hajda <a.hajda@samsung.com>
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
  */
  
- #include <drm/drmP.h>
- #include <drm/drm_panel.h>
+ #include <linux/delay.h>
  #include <linux/gpio/consumer.h>
+ #include <linux/module.h>
+ #include <linux/of.h>
  #include <linux/regulator/consumer.h>
  #include <linux/spi/spi.h>
  
index 4a2034ea7093f28e2e754404d8fc45685e4623f6,351eee9516484d713dc5563cf37f3e1848286a86..b923de23ed654fe7c6ce9d09fd96557f7366836b
@@@ -6,13 -5,16 +6,12 @@@
   * Donghwa Lee <dh09.lee@samsung.com>
   * Hyungwon Hwang <human.hwang@samsung.com>
   * Hoegeun Kwon <hoegeun.kwon@samsung.com>
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
   */
  
- #include <drm/drmP.h>
- #include <drm/drm_mipi_dsi.h>
- #include <drm/drm_panel.h>
  #include <linux/backlight.h>
+ #include <linux/delay.h>
  #include <linux/gpio/consumer.h>
+ #include <linux/module.h>
  #include <linux/of_device.h>
  #include <linux/regulator/consumer.h>
  
index 4b58098e1918c63412196b30529a6195b3c31a3a,19ea325a0e9b9a1fe2263eda9f2b936d6055eb9e..cd90fa700c49331e7201cb1c8042d48599a75d6f
@@@ -6,16 -5,25 +6,21 @@@
   *
   * Inki Dae <inki.dae@samsung.com>
   * Hoegeun Kwon <hoegeun.kwon@samsung.com>
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
   */
  
- #include <drm/drmP.h>
- #include <drm/drm_mipi_dsi.h>
- #include <drm/drm_panel.h>
  #include <linux/backlight.h>
+ #include <linux/delay.h>
  #include <linux/gpio/consumer.h>
+ #include <linux/module.h>
  #include <linux/regulator/consumer.h>
  #include <video/mipi_display.h>
  
+ #include <drm/drm_mipi_dsi.h>
+ #include <drm/drm_modes.h>
+ #include <drm/drm_panel.h>
+ #include <drm/drm_print.h>
  #define MCS_LEVEL2_KEY                0xf0
  #define MCS_MTP_KEY           0xf1
  #define MCS_MTP_SET3          0xd4
index 00fc807c12cd7037a43cf55fc0038a89e69631e5,0dcbda8310e3583d3f093a8c8366c7340361dbaf..81858267723ad0ce5888ebb90f7f50958ebe03c5
   * Eunchul Kim <chulspro.kim@samsung.com>
   * Tomasz Figa <t.figa@samsung.com>
   * Andrzej Hajda <a.hajda@samsung.com>
 - *
 - * This program is free software; you can redistribute it and/or modify
 - * it under the terms of the GNU General Public License version 2 as
 - * published by the Free Software Foundation.
  */
  
- #include <drm/drmP.h>
- #include <drm/drm_mipi_dsi.h>
- #include <drm/drm_panel.h>
+ #include <linux/delay.h>
  #include <linux/gpio/consumer.h>
+ #include <linux/module.h>
+ #include <linux/of.h>
  #include <linux/regulator/consumer.h>
  
  #include <video/mipi_display.h>
index 984c7c27997bfaca6f0e88be1c07357f8f6c9040,bf85a8fa9ad0e988da1b31a9a359d2df6b0a9478..5e3e92ea9ea6988595445c806d427414a53ffcbb
@@@ -1,9 -1,15 +1,12 @@@
 +// SPDX-License-Identifier: GPL-2.0-only
  /*
   * Copyright (C) 2017 Free Electrons
 - *
 - * This program is free software; you can redistribute it and/or
 - * modify it under the terms of the GNU General Public License version
 - * 2 as published by the Free Software Foundation.
   */
  
+ #include <linux/backlight.h>
+ #include <linux/delay.h>
  #include <linux/gpio/consumer.h>
+ #include <linux/module.h>
  #include <linux/regulator/consumer.h>
  #include <linux/spi/spi.h>
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 82bba68c554e7fbe296e14b22d6e5ba7c175483d,f2fe3c11c70e2235480ade419f19e2e29c705160..67ffa46a8e96e10193b3ae38a95632ed7322a05f
@@@ -460,7 -465,18 +461,18 @@@ static int prp_setup_rotation(struct pr
        incc = priv->cc[PRPENCVF_SINK_PAD];
        outcc = vdev->cc;
  
 -      ret = imx_media_alloc_dma_buf(priv->md, &priv->rot_buf[0],
+       ret = ipu_ic_calc_csc(&csc,
+                             infmt->ycbcr_enc, infmt->quantization,
+                             incc->cs,
+                             outfmt->ycbcr_enc, outfmt->quantization,
+                             outcc->cs);
+       if (ret) {
+               v4l2_err(&ic_priv->sd, "ipu_ic_calc_csc failed, %d\n",
+                        ret);
+               return ret;
+       }
 +      ret = imx_media_alloc_dma_buf(ic_priv->ipu_dev, &priv->rot_buf[0],
                                      outfmt->sizeimage);
        if (ret) {
                v4l2_err(&ic_priv->sd, "failed to alloc rot_buf[0], %d\n", ret);
index b5b8a3b7730a2d0c46e1623a09d54c264d965824,05b63395084e1c30f6bc366f5fa39296540be520..9088c4b720a310cecceca7e8389585c84870e8d8
@@@ -555,25 -561,19 +561,18 @@@ void imx_media_try_colorimetry(struct v
                        tryfmt->ycbcr_enc =
                                V4L2_MAP_YCBCR_ENC_DEFAULT(tryfmt->colorspace);
                }
-               if (tryfmt->quantization == V4L2_QUANTIZATION_DEFAULT) {
-                       tryfmt->quantization =
-                               V4L2_MAP_QUANTIZATION_DEFAULT(
-                                       is_rgb, tryfmt->colorspace,
-                                       tryfmt->ycbcr_enc);
-               }
        }
  
-       if (ic_route) {
-               tryfmt->quantization = is_rgb ?
-                       V4L2_QUANTIZATION_FULL_RANGE :
-                       V4L2_QUANTIZATION_LIM_RANGE;
-               tryfmt->ycbcr_enc = V4L2_YCBCR_ENC_601;
-       }
+       if (tryfmt->quantization == V4L2_QUANTIZATION_DEFAULT)
+               tryfmt->quantization =
+                       V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb,
+                                                     tryfmt->colorspace,
+                                                     tryfmt->ycbcr_enc);
  }
- EXPORT_SYMBOL_GPL(imx_media_fill_default_mbus_fields);
+ EXPORT_SYMBOL_GPL(imx_media_try_colorimetry);
  
  int imx_media_mbus_fmt_to_pix_fmt(struct v4l2_pix_format *pix,
 -                                struct v4l2_rect *compose,
 -                                const struct v4l2_mbus_framefmt *mbus,
 +                                struct v4l2_mbus_framefmt *mbus,
                                  const struct imx_media_pixfmt *cc)
  {
        u32 width;
index 8a60bdafe2da149374302df181cf4717a509db35,23024c9bc887101767b35c2c057631ee67b009c6..4d124a86b358ac72fa1f9f5538ddca99a5a2f609
@@@ -166,11 -172,11 +166,10 @@@ int imx_media_init_mbus_fmt(struct v4l2
                            const struct imx_media_pixfmt **cc);
  int imx_media_init_cfg(struct v4l2_subdev *sd,
                       struct v4l2_subdev_pad_config *cfg);
- void imx_media_fill_default_mbus_fields(struct v4l2_mbus_framefmt *tryfmt,
-                                       struct v4l2_mbus_framefmt *fmt,
-                                       bool ic_route);
+ void imx_media_try_colorimetry(struct v4l2_mbus_framefmt *tryfmt,
+                              bool ic_route);
  int imx_media_mbus_fmt_to_pix_fmt(struct v4l2_pix_format *pix,
 -                                struct v4l2_rect *compose,
 -                                const struct v4l2_mbus_framefmt *mbus,
 +                                struct v4l2_mbus_framefmt *mbus,
                                  const struct imx_media_pixfmt *cc);
  int imx_media_mbus_fmt_to_ipu_image(struct ipu_image *image,
                                    struct v4l2_mbus_framefmt *mbus);
index f775870df7e0e2e0e3cf19d199daeeb8b95eea75,6e2f4c3eb24fec00515b190bdbdac4ff856ce18c..500b4c08d9677bb2a38672b699d548d28b47ee9a
@@@ -1017,10 -1016,11 +1015,10 @@@ static int imx7_csi_try_fmt(struct imx7
                break;
        default:
                return -EINVAL;
 -              break;
        }
+       imx_media_try_colorimetry(&sdformat->format, false);
        return 0;
  }
  
Simple merge