1. 11 Sep, 2022 2 commits
    • Melissa Wen's avatar
      drm/vkms: fix 32bit compilation error by replacing macros · 89b03aea
      Melissa Wen authored
      Replace vkms_formats macro for fixed-point operations with functions
      from drm/drm_fixed.h to do the same job and fix 32-bit compilation
      errors.
      
      v2:
      - don't cast results to s32 (Igor)
      - add missing drm_fixp2int conversion (Igor)
      
      Fixes: a19c2ac9858 ("drm: vkms: Add support to the RGB565 format")
      Tested-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> (v1)
      Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
      Reported-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarMelissa Wen <mwen@igalia.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220910190303.682897-1-mwen@igalia.com
      89b03aea
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-2022-09-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next · fb34d8a0
      Dave Airlie authored
      drm-misc-next for v6.1-rc1:
      
      [airlied - fix sun4i_tv build]
      
      UAPI Changes:
      - Hide unregistered connectors from GETCONNECTOR ioctl.
      - drm/virtio no longer advertises LINEAR modifier, as it doesn't work.
      -
      
      Cross-subsystem Changes:
      - Fix GPF in udmabuf failure path.
      
      Core Changes:
      - Rework TTM placement to use intersect/compatible functions.
      - Drop legacy DP-MST support.
      - More DP-MST related fixes, and move all state into atomic.
      - Make DRM_MIPI_DBI select DRM_KMS_HELPER.
      - Add audio_infoframe packing for DP.
      - Add logging when some atomic check functions fail.
      - Assorted documentation updates and fixes.
      
      Driver Changes:
      - Assorted cleanups and fixes in msm, lcdif, nouveau, virtio,
        panel/ilitek, bridge/icn6211, tve200, gma500, bridge/*, panfrost, via,
        bochs, qxl, sun4i.
      - Add add AUO B133UAN02.1, IVO M133NW4J-R3, Innolux N120ACA-EA1 eDP panels.
      - Improve DP-MST modeset state handling in amdgpu, nouveau, i915.
      - Drop DP-MST from radeon driver, it was broken and only user of legacy
        DP-MST.
      - Handle unplugging better in vc4.
      - Simplify drm cmdparser tests.
      - Add DP support to ti-sn65dsi86.
      - Add MT8195 DP support to mediatek.
      - Support RGB565, XRGB64, and ARGB64 formats in vkms.
      - Convert sun4i tv support to atomic.
      - Refactor vc4/vec TV Modesetting, and fix timings.
      - Use atomic helpers instead of simple display helpers in ssd130x.
      
      Maintainer changes:
      - Add Douglas Anderson as reviewer for panel-edp.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/a489485b-3ebc-c734-0f80-aed963d89efe@linux.intel.com
      fb34d8a0
  2. 08 Sep, 2022 4 commits
    • Imre Deak's avatar
      drm/dp_mst: Avoid deleting payloads for connectors staying enabled · 5d832b66
      Imre Deak authored
      When an MST connector stays enabled during a commit the connector's MST
      state needs to be added to the atomic state, but the corresponding MST
      payload allocation shouldn't be set for deletion; fix such modesets by
      ensuring the above even if the connector was already enabled before the
      modeset.
      
      The issue led to the following:
      [  761.992923] i915 0000:00:02.0: drm_WARN_ON(payload->delete)
      [  761.992949] WARNING: CPU: 6 PID: 1401 at drivers/gpu/drm/display/drm_dp_mst_topology.c:4221 drm_dp_atomic_find_time_slots+0x236/0x280 [drm_display_helper]
      [  761.992955] Modules linked in: snd_hda_intel i915 drm_buddy drm_display_helper drm_kms_helper ttm drm snd_hda_codec_hdmi snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core snd_pcm prime_numbers i2c_algo_bit syscopyarea sysfillrect sysimgblt fb_sys_fops x86_pkg_temp_thermal cdc_ether coretemp crct10dif_pclmul usbnet crc32_pclmul mii ghash_clmulni_intel e1000e mei_me ptp i2c_i801 pps_core mei i2c_smbus intel_lpss_pci fuse [last unloaded: drm]
      [  761.992986] CPU: 6 PID: 1401 Comm: testdisplay Tainted: G     U             6.0.0-rc4-imre+ #565
      [  761.992989] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-P DDR5 RVP, BIOS ADLPFWI1.R00.3135.A00.2203251419 03/25/2022
      [  761.992990] RIP: 0010:drm_dp_atomic_find_time_slots+0x236/0x280 [drm_display_helper]
      [  761.992994] Code: 4c 8b 67 50 4d 85 e4 75 03 4c 8b 27 e8 03 28 4e e1 48 c7 c1 8b 26 2c a0 4c 89 e2 48 c7 c7 a8 26 2c a0 48 89 c6 e8 31 d5 88 e1 <0f> 0b 49 8b 85 d0 00 00 00 4c 89 fa 48 c7 c6 a0 41 2c a0 48 8b 78
      [  761.992995] RSP: 0018:ffffc9000177ba60 EFLAGS: 00010286
      [  761.992998] RAX: 0000000000000000 RBX: ffff88810d2f1540 RCX: 0000000000000000
      [  761.992999] RDX: 0000000000000001 RSI: ffffffff82368a25 RDI: 00000000ffffffff
      [  761.993000] RBP: ffff888142299d80 R08: ffff8884adbfdfe8 R09: 00000000ffefffff
      [  761.993001] R10: ffff8884a6bfe000 R11: ffff8884ac443c30 R12: ffff888102972f90
      [  761.993002] R13: ffff8881163e2cf0 R14: 00000000000003ac R15: ffff88810c501000
      [  761.993003] FS:  00007f81e4c459c0(0000) GS:ffff888496500000(0000) knlGS:0000000000000000
      [  761.993004] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  761.993005] CR2: 0000555dac962a98 CR3: 0000000123a34006 CR4: 0000000000770ee0
      [  761.993006] PKRU: 55555554
      [  761.993007] Call Trace:
      [  761.993009]  <TASK>
      [  761.993012]  intel_dp_mst_compute_config+0x19a/0x350 [i915]
      [  761.993090]  intel_atomic_check+0xf37/0x3180 [i915]
      [  761.993168]  drm_atomic_check_only+0x5d3/0xa60 [drm]
      [  761.993182]  drm_atomic_commit+0x56/0xc0 [drm]
      [  761.993192]  ? drm_plane_get_damage_clips.cold+0x1c/0x1c [drm]
      [  761.993204]  drm_atomic_helper_set_config+0x78/0xc0 [drm_kms_helper]
      [  761.993214]  drm_mode_setcrtc+0x1ed/0x750 [drm]
      [  761.993232]  ? drm_mode_getcrtc+0x180/0x180 [drm]
      [  761.993241]  drm_ioctl_kernel+0xb5/0x150 [drm]
      [  761.993252]  drm_ioctl+0x203/0x3d0 [drm]
      [  761.993261]  ? drm_mode_getcrtc+0x180/0x180 [drm]
      [  761.993276]  __x64_sys_ioctl+0x8a/0xb0
      [  761.993281]  do_syscall_64+0x38/0x90
      [  761.993285]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
      [  761.993287] RIP: 0033:0x7f81e551aaff
      [  761.993288] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00
      [  761.993290] RSP: 002b:00007fff4304af10 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      [  761.993292] RAX: ffffffffffffffda RBX: 00007fff4304afa0 RCX: 00007f81e551aaff
      [  761.993293] RDX: 00007fff4304afa0 RSI: 00000000c06864a2 RDI: 0000000000000004
      [  761.993294] RBP: 00000000c06864a2 R08: 0000000000000000 R09: 0000555dac8a9c68
      [  761.993294] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000008c4
      [  761.993295] R13: 0000000000000004 R14: 0000555dac8a9c68 R15: 00007fff4304b098
      [  761.993301]  </TASK>
      
      Fixes: 083351e9 ("drm/display/dp_mst: Fix modeset tracking in drm_dp_atomic_release_vcpi_slots()")
      Testcase: igt@testdisplay
      Cc: Lyude Paul <lyude@redhat.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220907142542.1681994-1-imre.deak@intel.com
      5d832b66
    • Chen-Yu Tsai's avatar
      drm/panel-edp: Add Innolux N120ACA-EA1 panel entry · 758d7b34
      Chen-Yu Tsai authored
      This panel has the same delay timing as N116BCA-EA1 from the same
      company, which is also the same as delay_200_500_e80_d50.
      
      Add an entry for it.
      Signed-off-by: default avatarChen-Yu Tsai <wenst@chromium.org>
      Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220908085454.1024167-2-wenst@chromium.org
      758d7b34
    • Maxime Ripard's avatar
      drm/sun4i: tv: Merge mode_set into atomic_enable · ec491291
      Maxime Ripard authored
      Our mode_set implementation can be merged into our atomic_enable
      implementation to simplify things, so let's do this.
      Acked-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220728-rpi-analog-tv-properties-v2-36-459522d653a7@cerno.tech
      ec491291
    • Javier Martinez Canillas's avatar
      drm/ssd130x: Replace simple display helpers with the atomic helpers · 622113b9
      Javier Martinez Canillas authored
      The simple display pipeline is a set of helpers that can be used by DRM
      drivers to avoid dealing with all the needed components and just define
      a few functions to operate a simple display device with one full-screen
      scanout buffer feeding a single output.
      
      But it is arguable that this provides the correct level of abstraction
      for simple drivers, and recently some have been ported from using these
      simple display helpers to use the regular atomic helpers instead.
      
      The rationale for this is that the simple display pipeline helpers don't
      hide that much of the DRM complexity, while adding an indirection layer
      that conflates the concepts of CRTCs and planes. This makes the helpers
      less flexible and harder to be reused among different graphics drivers.
      
      Also, for simple drivers, using the full atomic helpers doesn't require
      a lot of additional code. So adding a simple display pipeline layer may
      not be worth it.
      
      For these reasons, let's follow that trend and make ssd130x a plain DRM
      driver that creates its own primary plane, CRTC, enconder and connector.
      Suggested-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
      Acked-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220905222759.2597186-1-javierm@redhat.com
      622113b9
  3. 07 Sep, 2022 17 commits
  4. 06 Sep, 2022 4 commits
    • Douglas Anderson's avatar
      07d50b82
    • Randy Dunlap's avatar
      drm/scheduler: quieten kernel-doc warnings · f8ad757e
      Randy Dunlap authored
      Fix kernel-doc warnings in gpu_scheduler.h and sched_main.c.
      
      Quashes these warnings:
      
      include/drm/gpu_scheduler.h:332: warning: missing initial short description on line:
       * struct drm_sched_backend_ops
      include/drm/gpu_scheduler.h:412: warning: missing initial short description on line:
       * struct drm_gpu_scheduler
      include/drm/gpu_scheduler.h:461: warning: Function parameter or member 'dev' not described in 'drm_gpu_scheduler'
      
      drivers/gpu/drm/scheduler/sched_main.c:201: warning: missing initial short description on line:
       * drm_sched_dependency_optimized
      drivers/gpu/drm/scheduler/sched_main.c:995: warning: Function parameter or member 'dev' not described in 'drm_sched_init'
      
      Fixes: 2d33948e ("drm/scheduler: add documentation")
      Fixes: 8ab62eda ("drm/sched: Add device pointer to drm_gpu_scheduler")
      Fixes: 542cff78 ("drm/sched: Avoid lockdep spalt on killing a processes")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
      Cc: Nayan Deshmukh <nayan26deshmukh@gmail.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Jiawei Gu <Jiawei.Gu@amd.com>
      Cc: dri-devel@lists.freedesktop.org
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220404213040.12912-1-rdunlap@infradead.org
      f8ad757e
    • Xin Ji's avatar
      drm/bridge: anx7625: Set HPD irq detect window to 2ms · 8e3d857c
      Xin Ji authored
      Some panels trigger HPD irq due to noise, the HPD debounce
      may be 1.8ms, exceeding the default irq detect window, ~1.4ms.
      This patch set HPD irq detection window to 2ms to
      tolerate the HPD noise.
      Signed-off-by: default avatarXin Ji <xji@analogixsemi.com>
      Reviewed-by: default avatarRobert Foss <robert.foss@linaro.org>
      Signed-off-by: default avatarRobert Foss <robert.foss@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220903130833.541463-1-xji@analogixsemi.com
      8e3d857c
    • Daniel Vetter's avatar
      Merge tag 'drm-misc-next-2022-08-20-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next · 8284bae7
      Daniel Vetter authored
      drm-misc-next for v6.1:
      
      UAPI Changes:
      
      Cross-subsystem Changes:
      - DMA-buf: documentation updates.
      - Assorted small fixes to vga16fb
      - Fix fbdev drivers to use the aperture helpers.
      - Make removal of conflicting drivers work correctly without fbdev enabled.
      
      Core Changes:
      - bridge, scheduler, dp-mst: Assorted small fixes.
      - Add more format helpers to fourcc, and use it to replace the cpp usage.
      - Add DRM_FORMAT_Cxx, DRM_FORMAT_Rxx (single channel), and DRM_FORMAT_Dxx
        ("darkness", inverted single channel)
      - Add packed AYUV8888 and XYUV8888 formats.
      - Assorted documentation updates.
      - Rename ttm_bo_init to ttm_bo_init_validate.
      - Allow TTM bo's to exist without backing store.
      - Convert drm selftests to kunit.
      - Add managed init functions for (panel) bridge, crtc, encoder and connector.
      - Fix endianness handling in various format conversion helpers.
      - Make tests pass on big-endian platforms, and add test for rgb888 -> rgb565
      - Move DRM_PLANE_HELPER_NO_SCALING to atomic helpers and rename, so
        drm_plane_helper is no longer needed in most drivers.
      - Use idr_init_base instead of idr_init.
      - Rename FB and GEM CMA helpers to DMA helpers.
      - Rework XRGB8888 related conversion helpers, and add drm_fb_blit() that
        takes a iosys_map. Make drm_fb_memcpy take an iosys_map too.
      - Move edid luminance calculation to core, and use it in i915.
      
      Driver Changes:
      - bridge/{adv7511,ti-sn65dsi86,parade-ps8640}, panel/{simple,nt35510,tc358767},
        nouveau, sun4i, mipi-dsi, mgag200, bochs, arm, komeda, vmwgfx, pl111:
        Assorted small fixes and doc updates.
      - vc4: Rework hdmi power up, and depend on PM.
      - panel/simple: Add Samsung LTL101AL01.
      - ingenic: Add JZ4760(B) support, avoid a modeset when sharpness property
        is unchanged, and use the new PM ops.
      - Revert some amdgpu commits that cause garbaged graphics when starting
        X, and reapply them with the real problem fixed.
      - Completely rework vc4 init to use managed helpers.
      - Rename via_drv to via_dri1, and move all stuff there only used by the
        dri1 implementation in preperation for atomic modeset.
      - Use regmap bulk write in ssd130x.
      - Power sequence and clock updates to it6505.
      - Split panel-sitrox-st7701  init sequence and rework mode programming code.
      - virtio: Improve error and edge conditions handling, and convert to use managed
        helpers.
      - Add Samsung LTL101AL01, B120XAN01.0, R140NWF5 RH, DMT028VGHMCMI-1A T, panels.
      - Add generic fbdev support to komeda.
      - Split mgag200 modeset handling to make it more model-specific.
      - Convert simpledrm to use atomic helpers.
      - Improve udl suspend/disconnect handling.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/f0c71766-61e8-19b7-763a-5fbcdefc633d@linux.intel.com
      8284bae7
  5. 05 Sep, 2022 12 commits
  6. 04 Sep, 2022 1 commit