summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/kms/nv50-: convert wndw sema_clr() to new push macrosBen Skeggs2020-07-244-17/+21
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/kms/nv50-: convert wndw sema_set() to new push macrosBen Skeggs2020-07-246-23/+219
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/kms/nv50-: convert wimm update() to new push macrosBen Skeggs2020-07-244-15/+20
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/kms/nv50-: convert wimm point() to new push macrosBen Skeggs2020-07-246-12/+93
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/kms/nv50-: wrap existing command submission in nvif_push interfaceBen Skeggs2020-07-245-7/+614
| | | | | | | | | | | This commit pulls in a bunch of new push buffer macros which are able to support NVIDIA's class headers, and provide more useful debug output and error checking (compile-time, where possible) than we had previously. Will incrementally transition each function over to the unified interfaces. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/nvif: add support for object-level debug outputBen Skeggs2020-07-246-0/+89
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/nvif: give every notify object a human-readable nameBen Skeggs2020-07-2412-28/+35
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/nvif: give every disp object a human-readable identifierBen Skeggs2020-07-243-4/+7
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/nvif: give every usermode object a human-readable identifierBen Skeggs2020-07-244-7/+7
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/nvif: give every vmm object a human-readable identifierBen Skeggs2020-07-244-13/+14
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/nvif: give every mem object a human-readable identifierBen Skeggs2020-07-246-31/+36
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/nvif: give every mmu object a human-readable identifierBen Skeggs2020-07-243-9/+12
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/nvif: give every device object a human-readable identifierBen Skeggs2020-07-244-12/+12
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/nvif: give every object a human-readable identifierBen Skeggs2020-07-2428-105/+115
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/nvif: rename client ctor/dtorBen Skeggs2020-07-244-8/+8
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* drm/nouveau/kms/tu102: set ↵Ben Skeggs2020-07-241-1/+1
| | | | | | | | NVC57D_HEAD_SET_HEAD_USAGE_BOUNDS_UPSCALING_ALLOWED to TRUE Fixes issues when switching between scaling modes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Use fallthrough pseudo-keywordGustavo A. R. Silva2020-07-2417-45/+45
| | | | | | | | | | | Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/vmm/gp100-: fix mapping 2MB sysmem pagesRalph Campbell2020-07-242-3/+84
| | | | | | | | | | The nvif_object_ioctl() method NVIF_VMM_V0_PFNMAP wasn't correctly setting the hardware specific GPU page table entries for 2MB sized pages. Fix this by adding functions to set and clear PD0 GPU page table entries. Signed-off-by: Ralph Campbell <rcampbell@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mmu: make nvkm_vmm_ctor() staticRalph Campbell2020-07-242-4/+1
| | | | | | | | | The function nvkm_vmm_ctor() is not called outside of the file defining it, so make it static. Signed-off-by: Ralph Campbell <rcampbell@nvidia.com> Reviewed-by: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix reference count leak in nouveau_debugfs_strap_peekAditya Pakki2020-07-241-1/+3
| | | | | | | | | nouveau_debugfs_strap_peek() calls pm_runtime_get_sync() that increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix reference count leak in nouveau_connector_detectAditya Pakki2020-07-241-1/+3
| | | | | | | | | nouveau_connector_detect() calls pm_runtime_get_sync and in turn increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix reference count leak in nv50_disp_atomic_commitAditya Pakki2020-07-241-1/+3
| | | | | | | | | nv50_disp_atomic_commit() calls calls pm_runtime_get_sync and in turn increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix multiple instances of reference count leaksAditya Pakki2020-07-242-3/+9
| | | | | | | | | On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_openAditya Pakki2020-07-241-1/+3
| | | | | | | | | nouveau_fbcon_open() calls calls pm_runtime_get_sync() that increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/sec2/gp102: allow module to load when LSFW is missingBen Skeggs2020-07-243-10/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gm200-: explicitly handle nofwBen Skeggs2020-07-2412-11/+29
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pmu/gm200-: explicitly handle nofwBen Skeggs2020-07-245-4/+15
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pmu/gm20x: don't pretend we support loading with our custom FWBen Skeggs2020-07-244-11/+11
| | | | | | | | | | | It technically loads, and runs, but is ultimately pointless outside of a very narrow window (fanless systems where one wants to attempt using the, broken for a lot of gm20x, memory reclocking code). It's also potentially dangerous to override the VBIOS-provided "Pre-OS" PMU, which would be responsible for fan control otherwise. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/acr: store a mask of LS falcons the controlling LSFW can bootstrapBen Skeggs2020-07-245-6/+38
| | | | | | | | This will prevent some pain with broken firmware trees, as under some circumstances the HSFW can fail and leave the GPU in a state we don't know how to recover from. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/acr: store a mask of LS falcons the HSFW can bootstrapBen Skeggs2020-07-243-4/+14
| | | | | | | | | | This will prevent reloading of HS FW where it's pointless, and bypass hitting some timeouts. Not a situation one should generally hit, but can occur with a messed up firmware installation. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/acr: allow module to load when HSFW(s) are missingBen Skeggs2020-07-247-6/+25
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/acr: refuse to load LSFW if HSFW is missingBen Skeggs2020-07-241-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: drop error message when no compatible FW foundBen Skeggs2020-07-241-4/+1
| | | | | | | This is less than useful with some subdevs having _nofw variants in their FWIF lists - it's cleaner to handle them all in the same way. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mmu/gp100-: enable mmu invalidate depth optimisationBen Skeggs2020-07-242-3/+2
| | | | | | | | This causes us to invalidate MMU only at the level we made modifications - ie: if we've only modified PTEs, there's no need to have MMU dump the PDs it's fetched into L2. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvfw: firmware structures should begin with nvfw_Timur Tabi2020-07-249-23/+23
| | | | | | | | | | | | Rename all structures that are used directly by firmware to have a nvfw_ prefix. This makes it easier to identify structures that have a fixed, specific layout. A future patch will define several more such structures, so it's important to be consistent now. Signed-off-by: Timur Tabi <ttabi@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/tmr: fix nvkm_usec/nvkm_msec definitionsTimur Tabi2020-07-241-2/+2
| | | | | | | | | | | | | nvkm_timer_wait_init() takes a u64 as a duration parameter, but the expression "(m) * 1000" will be promoted only to a 32-bit integer, if 'm' is also an integer. Changing the 1000 to 1000ULL ensures that the expression will be 64 bits. This change currently has no effect as there are no callers of nvkm_msec() that exceed 2000ms. Signed-off-by: Timur Tabi <ttabi@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm/gt215: make gt215_therm_init staticBen Skeggs2020-07-241-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mmu: make a couple of functions staticBen Skeggs2020-07-242-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mc/gp10b: make gp10b_mc_init staticBen Skeggs2020-07-241-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/nvfw/acr: make lsb_header_tail_dump staticBen Skeggs2020-07-241-3/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gr/gf100-: make some functions staticBen Skeggs2020-07-242-6/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp/gm200-: remove 'head' parameter from nvkm_ior_func.hdmi.scdc()Ben Skeggs2020-07-243-5/+4
| | | | | | It's no longer required. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Merge tag 'mediatek-drm-next-5.9' of ↵Dave Airlie2020-07-241-185/+84
|\ | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 5.9 This include converting mtk_dsi to drm_bridge API. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Chun-Kuang Hu <chunkuang.hu@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200716233102.566-1-chunkuang.hu@kernel.org
| * drm/mediatek: mtk_dsi: Create connector for bridgesEnric Balletbo i Serra2020-07-051-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | Use the drm_bridge_connector helper to create a connector for pipelines that use drm_bridge. This allows splitting connector operations across multiple bridges when necessary, instead of having the last bridge in the chain creating the connector and handling all connector operations internally. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
| * drm/mediatek: mtk_dsi: Use the drm_panel_bridge APIEnric Balletbo i Serra2020-07-051-159/+14
| | | | | | | | | | | | | | | | | | | | | | Replace the manual panel handling code by a drm_panel_bridge. This simplifies the driver and allows all components in the display pipeline to be treated as bridges, paving the way to generic connector handling. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
| * drm/mediatek: mtk_dsi: Use simple encoderEnric Balletbo i Serra2020-07-051-11/+2
| | | | | | | | | | | | | | | | | | | | The mtk_dsi driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
| * drm/mediatek: mtk_dsi: Convert to bridge driverEnric Balletbo i Serra2020-07-051-38/+79
| | | | | | | | | | | | | | | | | | Convert mtk_dsi to a bridge driver with built-in encoder support for compatibility with existing component drivers. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
| * drm/mediatek: mtk_dsi: Rename bridge to next_bridgeEnric Balletbo i Serra2020-07-051-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | This is really a cosmetic change just to make a bit more readable the code after convert the driver to drm_bridge. The bridge variable name will be used by the encoder drm_bridge, and the chained bridge will be named next_bridge. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
* | Merge tag 'drm/tegra/for-5.9-rc1' of ↵Dave Airlie2020-07-2413-42/+108
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ssh://git.freedesktop.org/git/tegra/linux into drm-next drm/tegra: Changes for v5.9-rc1 This set of patches contains a few preparatory patches to enable video capture support from external camera modules. This is a dependency for the V4L2 driver patches that will likely be merged in v5.9 or v5.10. On top of that there are a couple of fixes across the board as well as some improvements. From a feature point of view this also adds support for horizontal reflection and 180° rotation of planes. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thierry Reding <thierry.reding@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200717162011.1661788-1-thierry.reding@gmail.com
| * | drm/tegra: plane: Support 180° rotationDmitry Osipenko2020-07-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Combining horizontal and vertical reflections gives us 180 degrees of rotation. Both reflection modes are already supported, and thus, we just need to mark the 180 rotation mode as supported. The 180 rotation mode is needed for devices like Nexus 7 tablet, which have display panel mounted upside-down. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>