summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-07-27drm/i915/vm_bind: Fix vm->vm_bind_mutex and vm->mutex nestingvm-bindNiranjana Vishwanathapura
VM_BIND functionality maintain that vm->vm_bind_mutex will never be taken while holding vm->mutex. However, while closing 'vm', vma is destroyed while holding vm->mutex. But vma releasing needs to take vm->vm_bind_mutex in order to delete vma from the vm_bind_list. To avoid this, destroy the vma outside vm->mutex while closing the 'vm'. Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
2022-07-27drm/i915/vm_bind: Skip vma_lookup for persistent vmasNiranjana Vishwanathapura
vma_lookup is tied to segment of the object instead of section of VA space. Hence, it do not support aliasing (ie., multiple bindings to the same section of the object). Skip vma_lookup for persistent vmas as it supports aliasing. Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
2022-07-27drm/i915/vm_bind: userptr dma-resv changesNiranjana Vishwanathapura
For persistent (vm_bind) vmas of userptr BOs, handle the user page pinning by using the i915_gem_object_userptr_submit_init() /done() functions Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
2022-07-27drm/i915/vm_bind: Handle persistent vmas in execbuf3Niranjana Vishwanathapura
Handle persistent (VM_BIND) mappings during the request submission in the execbuf3 path. Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
2022-07-27drm/i915/vm_bind: Add I915_GEM_EXECBUFFER3 ioctlNiranjana Vishwanathapura
Add new execbuf3 ioctl (I915_GEM_EXECBUFFER3) which only works in vm_bind mode. The vm_bind mode only works with this new execbuf3 ioctl. The new execbuf3 ioctl will not have any execlist support and all the legacy support like relocations etc are removed. Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
2022-07-27drm/i915/vm_bind: Handle persistent vmasNiranjana Vishwanathapura
Treat VM_BIND vmas as persistent and handle them during the request submission in the execbuff path. Support eviction by maintaining a list of evicted persistent vmas for rebinding during next submission. Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
2022-07-27drm/i915/vm_bind: Add out fence supportNiranjana Vishwanathapura
Add support for handling out fence of vm_bind call. Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
2022-07-27drm/i915/vm_bind: Support private and shared BOsNiranjana Vishwanathapura
Add uapi allowing user to specify a BO as private to a specified VM during the BO creation. VM private BOs can only be mapped on the specified VM and can't be dma_buf exported. VM private BOs share a single common dma_resv object, hence has a performance advantage requiring a single dma_resv object update in the execbuf path compared to non-private (shared) BOs. Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
2022-07-27drm/i915/vm_bind: Bind and unbind mappingsNiranjana Vishwanathapura
Bind and unbind the mappings upon VM_BIND and VM_UNBIND calls. Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> Signed-off-by: Prathap Kumar Valsan <prathap.kumar.valsan@intel.com>
2022-07-27drm/i915/vm_bind: Introduce VM_BIND ioctlNiranjana Vishwanathapura
Add VM_BIND and VM_UNBIND ioctls to bind/unbind a section of an object at the specified GPU virtual addresses. Add I915_PARAM_VM_BIND_VERSION to indicate version of VM_BIND feature supported and I915_VM_CREATE_FLAGS_USE_VM_BIND for UMDs to select the vm_bind mode of binding. Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
2022-07-27drm-tip: 2022y-07m-27d-07h-40m-43s UTC integration manifestThomas Zimmermann
2022-07-27Merge remote-tracking branch 'drm-intel/topic/core-for-CI' into drm-tipThomas Zimmermann
# Conflicts: # drivers/acpi/sleep.c # kernel/locking/lockdep.c # kernel/time/timer.c
2022-07-27Merge remote-tracking branch 'drm-intel/drm-intel-gt-next' into drm-tipThomas Zimmermann
2022-07-27Merge remote-tracking branch 'drm-intel/drm-intel-next' into drm-tipThomas Zimmermann
2022-07-27Merge remote-tracking branch 'drm-misc/drm-misc-next' into drm-tipThomas Zimmermann
# Conflicts: # drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
2022-07-27Merge remote-tracking branch 'drm/drm-next' into drm-tipThomas Zimmermann
# Conflicts: # drivers/gpu/drm/amd/display/Kconfig # drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c # drivers/gpu/drm/i915/gt/intel_engine_cs.c # drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
2022-07-27Merge remote-tracking branch 'drm-intel/drm-intel-fixes' into drm-tipThomas Zimmermann
2022-07-27Merge remote-tracking branch 'drm-misc/drm-misc-fixes' into drm-tipThomas Zimmermann
2022-07-27fbdev: Make registered_fb[] private to fbmem.cDaniel Vetter
No driver access this anymore, except for the olpc dcon fbdev driver but that has been marked as broken anyways by commit de0952f267ff ("staging: olpc_dcon: mark driver as broken"). Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20220725075400.68478-1-javierm@redhat.com
2022-07-27drm/panel/panel-sitronix-st7701: Add Densitron DMT028VGHMCMI-1A TFTMarek Vasut
Add support for Densitron DMT028VGHMCMI-1A TFT matrix into this driver. This is a DSI-attached 480x640 2.83 inch panel. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Guido Günther <agx@sigxcpu.org> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220725151703.319939-2-marex@denx.de
2022-07-27dt-bindings: display: panel: sitronix,st7701: Add Densitron DMT028VGHMCMI-1A TFTMarek Vasut
Add compatible string for Densitron DMT028VGHMCMI-1A TFT matrix. This is a DSI-attached 480x640 2.83 inch panel. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Guido Günther <agx@sigxcpu.org> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: devicetree@vger.kernel.org Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220725151703.319939-1-marex@denx.de
2022-07-27drm: Fix typo 'the the' in commentSlark Xiao
Replace 'the the' with 'the' in the comment. Signed-off-by: Slark Xiao <slark_xiao@163.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220721062345.46842-1-slark_xiao@163.com
2022-07-27drm/i915/hdmi: Prune modes that require HDMI2.1 FRLAnkit Nautiyal
HDMI2.1 requires some higher resolution video modes to be enumerated only if HDMI2.1 Fixed Rate Link (FRL) is supported. Current platforms do not support FRL transmission so prune modes that require HDMI2.1 FRL. v2: Fixed the condition to check for dotclock > 600. Return MODE_CLOCK_HIGH as mode status. Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> (v1) Signed-off-by: Uma Shankar <uma.shankar@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220721084645.3411219-1-ankit.k.nautiyal@intel.com
2022-07-27Merge tag 'topic/nouveau-misc-2022-07-27' of ↵Dave Airlie
git://anongit.freedesktop.org/drm/drm into drm-next drm/nouveau-misc: display patches. These are just some precursor and cleanup display patches from Ben, tested by Lyude. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Dave Airlie <airlied@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CAPM=9ty0R37q0mohBr_CegpYLXK2=fAH54QfAsMhHfPygTsdQA@mail.gmail.com
2022-07-27Merge tag 'amd-drm-next-5.20-2022-07-26' of ↵Dave Airlie
https://gitlab.freedesktop.org/agd5f/linux into drm-next amdgpu: - VCN4 fixes - RAS support for UMC 8.10 - ACP support for jadeite platforms - NBIO HDP flush fixes - Misc spelling and grammar fixes - Runtime PM fixes - Non-DC HPD fix - Clean up amdgpu DM code - DSC fixes - Expose some additional GFXOFF data via debugfs - More FP clean up for new DCN blocks - PPC DC FP fixes - DCN 3.1.4 fixes - DC DML stack usage fixes - GMC fixes - SPM fixes for RDNA2 amdkfd: - MMU notifier fix - Mutex fix UAPI: - Add a comment about VCN4 unified queues - IP version information for UMDs Proposed mesa change: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411/diffs?commit_id=c8a63590dfd0d64e6e6a634dcfed993f135dd075 Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220726181536.5759-1-alexander.deucher@amd.com
2022-07-27drm/nouveau/disp: move DAC load detection methodBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: add output classBen Skeggs
Will be used to more cleanly implement existing method interfaces that take some confusing (IEDTkey, inherited from VBIOS, which RM no longer uses on Ampere) match values to determine which display path to operate on. Methods will be protected from racing with supervisor, and from being called where they shouldn't be (ie. without an OR assigned). v2: - use ?: (lyude) v3: - fix return code if noacquire() method fails Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: add supervisor mutexBen Skeggs
Will be used to protect NVIF_CLASS_OUTP method calls from racing with in-progress supervisor handling. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: add conn method to query HPD pin statusBen Skeggs
And use it to bail early in DP detection and avoid futile AUX transactions. This could be used on other connector types too in theory, but it's not something we've ever done before and I'd rather not risk breaking working systems without looking into it more closely. It's safe for DP though. We already do this by checking an AUX register that contains HPD status and aborting the transaction. However, this is much deeper in the stack - after taking various mutexes, poking HW for no good reason, and making a mess in debug logs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: add connector classBen Skeggs
Will be used to provide more solid driver interfaces in general, but the immediate motivation is work towards fixing issues with handling hotplug/DP IRQ events. Its use is currently limited to where we support non-polled hotplug already (ie. any GPU since NV40ish era, where our DCB handling works well enough), until that gets cleaned up someday. v2: - use ?: (lyude) Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: add common channel class handlingBen Skeggs
Replaces a bunch of unnecessarily duplicated boilerplate in per-chipset code with a simpler, common, implementation. Channel "awaken" notify code is completely gone for now. KMS has never made use of it so far, and event notify handling is about to be changed in general anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: split sor hda funcs out to their own structBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: split sor dp funcs out to their own structBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: replace hda func pointer check with flagBen Skeggs
Simpler, and less error-prone than a separate set of function pointers. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: merge nv50_disp_new_() and nvkm_disp_new()Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: group supervisor-related struct membersBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: merge head/outp/ior code into chipset filesBen Skeggs
No changes to code at all here, just shuffling it around and removing a bunch of (now unnecessary) forward-declarations from headers. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: add common class handling between <nv50 and >=nv50Ben Skeggs
About to expose head/output path/connector objects everywhere, so we will need support for child classes prior to nv50 now. Somewhat cleaner than the code >=nv50 used previously. v2: - use ?: (lyude) Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: collapse nv50_disp into nvkm_dispBen Skeggs
Dump of one struct's members into another, with a couple of list renames because of collisions. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: collapse nv50_disp_func into nvkm_disp_funcBen Skeggs
Aside from a chicken-and-egg problem with a duplicate 'root' member, this is a straight dump of function pointers from one struct into another. The left-over wrapping mess in >=nv50 structs will be fixed later. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: clean up nvkm_outp constructorsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-27drm/nouveau/disp: collapse nvkm_dp into nvkm_outpBen Skeggs
There should be no changes to code here other than modifying the dereferences. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2022-07-26drm/fsl-dcu: Use drm_plane_helper_destroy()Thomas Zimmermann
Replace the driver's own function with drm_plane_helper_destroy(). No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220720083058.15371-8-tzimmermann@suse.de
2022-07-26drm/armada: Use drm_plane_helper_destroy()Thomas Zimmermann
Replace the driver's own function with drm_plane_helper_destroy(). No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220720083058.15371-7-tzimmermann@suse.de
2022-07-26drm/plane-helper: Export individual helpersThomas Zimmermann
Export the individual plane helpers that make up the plane functions and align the naming with other helpers. The plane helpers are for non-atomic modesetting and exporting them will simplify a later conversion of drivers to atomic modesetting. With struct drm_plane_funcs removed from drm_plane_helper.h, also remove the include statements. It only needs linux/types.h for uint32_t and a number of forward declarations. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220720083058.15371-6-tzimmermann@suse.de
2022-07-26drm: Remove unnecessary include statements of drm_plane_helper.hThomas Zimmermann
Remove the include statement for drm_plane_helper.h from all the files that don't need it. Althogh the header file is almost empty, many drivers include it somewhere. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220720083058.15371-5-tzimmermann@suse.de
2022-07-26drm/atomic-helper: Remove _HELPER_ infix from DRM_PLANE_HELPER_NO_SCALINGThomas Zimmermann
Rename DRM_PLANE_HELPER_NO_SCALING to DRM_PLANE_NO_SCALING. The constant is not really a helper, but rather a characteristic of the plane itself. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220720083058.15371-4-tzimmermann@suse.de
2022-07-26drm/atomic-helper: Move DRM_PLANE_HELPER_NO_SCALING to atomic helpersThomas Zimmermann
The macro DRM_PLANE_HELPER_NO_SCALING is only useful with the interfaces in drm_atomic_helper.h, but defined in drm_plane_helper.h. So half of DRM includes the latter header file for using this macro. Move the macro and remove the include statements. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20220720083058.15371-3-tzimmermann@suse.de
2022-07-26drm/vmwgfx: Remove trailing whitespaceThomas Zimmermann
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Reviewed-by: Zack Rusin <zackr@vmware.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220720083058.15371-2-tzimmermann@suse.de
2022-07-26drm/simpledrm: Fix return type of simpledrm_simple_display_pipe_mode_valid()Nathan Chancellor
When booting a kernel compiled with clang's CFI protection (CONFIG_CFI_CLANG), there is a CFI failure in drm_simple_kms_crtc_mode_valid() when trying to call simpledrm_simple_display_pipe_mode_valid() through ->mode_valid(): [ 0.322802] CFI failure (target: simpledrm_simple_display_pipe_mode_valid+0x0/0x8): ... [ 0.324928] Call trace: [ 0.324969] __ubsan_handle_cfi_check_fail+0x58/0x60 [ 0.325053] __cfi_check_fail+0x3c/0x44 [ 0.325120] __cfi_slowpath_diag+0x178/0x200 [ 0.325192] drm_simple_kms_crtc_mode_valid+0x58/0x80 [ 0.325279] __drm_helper_update_and_validate+0x31c/0x464 ... The ->mode_valid() member in 'struct drm_simple_display_pipe_funcs' expects a return type of 'enum drm_mode_status', not 'int'. Correct it to fix the CFI failure. Cc: stable@vger.kernel.org Fixes: 11e8f5fd223b ("drm: Add simpledrm driver") Link: https://github.com/ClangBuiltLinux/linux/issues/1647 Reported-by: Tomasz Paweł Gajc <tpgxyz@gmail.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Sami Tolvanen <samitolvanen@google.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220725233629.223223-1-nathan@kernel.org