summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/acr/gm20b: regression fixesBen Skeggs2023-01-303-2/+17
| | | | | | | | | | | Missed some Tegra-specific quirks when reworking ACR to support Ampere. Fixes: 2541626cfb79 ("drm/nouveau/acr: use common falcon HS FW code for ACR FWs") Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt> Tested-by: Nicolas Chauvet <kwizart@gmail.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230130223715.1831509-3-bskeggs@redhat.com
* drm/nouveau/fb/tu102-: fix register used to determine scrub statusBen Skeggs2023-01-307-17/+65
| | | | | | | | | | | Turing apparently needs to use the same register we use on Ampere. Not executing the scrubber ucode when required would result in large areas of VRAM being inaccessible to the driver. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230130223715.1831509-2-bskeggs@redhat.com
* drm/nouveau/devinit/tu102-: wait for GFW_BOOT_PROGRESS == COMPLETEDBen Skeggs2023-01-301-0/+23
| | | | | | | | | | | | | | | | | Starting from Turing, the driver is no longer responsible for initiating DEVINIT when required as the GPU started loading a FW image from ROM and executing DEVINIT itself after power-on. However - we apparently still need to wait for it to complete. This should correct some issues with runpm on some systems, where we get control of the HW before it's been fully reinitialised after resume from suspend. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230130223715.1831509-1-bskeggs@redhat.com
* drm/nouveau: Remove file nouveau_fbcon.cThomas Zimmermann2023-01-111-613/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Commit 4a16dd9d18a0 ("drm/nouveau/kms: switch to drm fbdev helpers") converted nouveau to generic fbdev emulation. The driver's internal implementation later got accidentally restored during a merge commit. Remove the file from the driver. No functional changes. v2: * point Fixes tag to merge commit (Alex) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Fixes: 4e291f2f5853 ("Merge tag 'drm-misc-next-2022-11-10-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-next") Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Karol Herbst <kherbst@redhat.com> Cc: Lyude Paul <lyude@redhat.com> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Javier Martinez Canillas <javierm@redhat.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Dave Airlie <airlied@redhat.com> Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20230110123526.28770-1-tzimmermann@suse.de
* Merge tag 'drm-misc-next-2022-11-17' of ↵Dave Airlie2022-11-221-1/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 6.2: UAPI Changes: Cross-subsystem Changes: - fbdev: Add support for the nomodeset kernel parameter Core Changes: - client: Add kunit tests for drm_connector_pick_cmdline_mode() - dma-buf: Move dma_buf_mmap_internal() to new locking specification - edid: Dump EDID on drm_edid_get_panel_id() failure, Stop using a temporary device to load the EDID through the firmware mechanism - fb-helper: Remove damage worker - gem-vram: Fix deadlock in drm_gem_vram_vmap() - modes: Named mode parsing improvements - tests: Add Kunit helpers to create a DRM device Driver Changes: - hisilicon: convert to drm_mode_init() - malidp: Use drm-managed resources - msm: convert to drm_mode_init() and drm_mode_copy() - mtk: convert to drm_mode_init() - nouveau: Support backlight control for nva3 - rockchip: convert to drm_mode_copy() - sti: convert to drm_mode_copy() - v3d: Switch to drm-managed resources - vc4: Fix potential NULL pointer dereference - panels: - New panel: NewVision NV3051D Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20221117083628.mzij5nrbdzokek7c@houat
| * drm/nouveau: Add support to control backlight using bl_power for nva3.Antonio Gomes2022-11-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: * Add support to turn on/off backlight when changing values in bl_power file. This is achieved by using function backlight_get_brightness() in nva3_set_intensity to get current brightness. Test plan: * Turn off: echo 1 > /sys/class/backlight/nv_backlight/bl_power * Turn on: echo 0 > /sys/class/backlight/nv_backlight/bl_power Signed-off-by: Antonio Gomes <antoniospg100@gmail.com> Signed-off-by: Karol Herbst <kherbst@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221104220424.41164-1-antoniospg100@gmail.com
* | Merge tag 'drm-misc-next-2022-11-10-1' of ↵Dave Airlie2022-11-162-0/+614
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 6.2: UAPI Changes: Cross-subsystem Changes: Core Changes: - atomic-helper: Add begin_fb_access and end_fb_access hooks - fb-helper: Rework to move fb emulation into helpers - scheduler: rework entity flush, kill and fini - ttm: Optimize pool allocations Driver Changes: - amdgpu: scheduler rework - hdlcd: Switch to DRM-managed resources - ingenic: Fix registration error path - lcdif: FIFO threshold tuning - meson: Fix return type of cvbs' mode_valid - ofdrm: multiple fixes (kconfig, types, endianness) - sun4i: A100 and D1 support - panel: - New Panel: Jadard JD9365DA-H3 Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20221110083612.g63eaocoaa554soh@houat
| * drm/fb-helper: Rename drm_fb_helper_unregister_fbi() to use _info postfixThomas Zimmermann2022-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | Rename drm_fb_helper_unregister_fbi() to drm_fb_helper_unregister_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-15-tzimmermann@suse.de
| * drm/fb-helper: Rename drm_fb_helper_alloc_fbi() to use _info postfixThomas Zimmermann2022-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | Rename drm_fb_helper_alloc_fbi() to drm_fb_helper_alloc_info() as part of unifying the naming within fbdev helpers. Adapt drivers. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-14-tzimmermann@suse.de
| * drm/fb_helper: Rename field fbdev to info in struct drm_fb_helperThomas Zimmermann2022-11-051-12/+11
| | | | | | | | | | | | | | | | | | | | | | Rename struct drm_fb_helper.fbdev to info. The current name is misleading as it overlaps with generic fbdev naming conventions. Adapt to the usual naming in fbdev drivers by calling the field 'info'. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221103151446.2638-13-tzimmermann@suse.de
* | drm/nouveau/disp: fix incorrect/broken hdmi methodsBen Skeggs2022-11-142-18/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are fixes from Lyude, and were meant to have been included in the last round of drm-next patches. - Fix some nasty memory issues that broke Lyude's display: - 0 initialize both nvif args and parsed HDMI infoframe buffers - Fixed missing memset(…, 0, …) for nvif args before sending VSI infoframe - Fixed incorrect data pointer and size in nvkm_uoutp_mthd_infoframe() (was previously pointing at the start of the nvif_outp_infoframe_args struct instead of at the start of the infoframe data - Get rid of duplicated scdc assignments, since we only use it to write the scdc registers Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/nouveau/gr/ga102: initial supportBen Skeggs2022-11-0915-9/+565
| | | | | | | | | | | | | | | | v2: - whitespace Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Gourav Samaiya <gsamaiya@nvidia.com>
* | drm/nouveau/ltc/ga102: initial supportBen Skeggs2022-11-094-1/+65
| | | | | | | | | | | | | | v2. fixup for ga103 early merge Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/acr/ga102: initial supportBen Skeggs2022-11-0928-14/+1091
| | | | | | | | | | | | | | v2. fixup for ga103 early merge Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Gourav Samaiya <gsamaiya@nvidia.com>
* | drm/nouveau/fb/ga102: load and boot VPR scrubber FWBen Skeggs2022-11-0919-5/+551
| | | | | | | | | | | | | | v2. fixup for ga103 early merge Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Gourav Samaiya <gsamaiya@nvidia.com>
* | drm/nouveau/gr/tu102: remove gv100_grctx_unkn88cBen Skeggs2022-11-091-1/+0
| | | | | | | | | | | | | | Match RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/tu102: add gv100_gr_init_4188a4Ben Skeggs2022-11-093-1/+4
| | | | | | | | | | | | | | Match RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/tu102-: fix support for sw_bundle64_initBen Skeggs2022-11-095-6/+17
| | | | | | | | | | | | | | We weren't sending the high bits, though they're zero currently anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/tu102-: use sw_veid_bundle_init from firmwareBen Skeggs2022-11-098-6/+44
| | | | | | | | | | | | | | | | | | | | NVIDIA provided this on Turing, but we kept using the hardcoded version from Volta (where they didn't). Switch to the firmware version prior to Ampere. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gv100-: drop a write from init_shader_exceptions()Ben Skeggs2022-11-091-1/+0
| | | | | | | | | | | | | | Match RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gv100-: move init_419bd8() after sw_ctx loadBen Skeggs2022-11-092-3/+3
| | | | | | | | | | | | | | Match RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gv100-: add NV_PGRAPH_PRI_PD_AB_DIST_CONFIG_1 to patch listBen Skeggs2022-11-091-0/+2
| | | | | | | | | | | | | | Match RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gv100-: fix number of tile map registersBen Skeggs2022-11-092-2/+3
| | | | | | | | | | | | | | Match RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gv100-: port smid mapping code from nvgpuBen Skeggs2022-11-097-12/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | Essentially ripped verbatim from NVGPU, comments and all, and adapted to nvkm's structs and style. - maybe fixes an nvgpu bug though, a small tweak was needed to match RM v2: - remove unnecessary WARN_ON Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gp100-: modify init_fecs_exceptionsBen Skeggs2022-11-092-2/+2
| | | | | | | | | | | | | | Match RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gk20a,gm20b,gp10b: split out netlist parsing from fw loadingBen Skeggs2022-11-092-67/+49
| | | | | | | | | | | | | | We'll want to reuse the former for loading from proper netlist images. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gp100-: fix number of zcull tile regsBen Skeggs2022-11-092-3/+5
| | | | | | | | | | | | | | Match RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf117-: make ppc_nr[gpc] accurateBen Skeggs2022-11-098-9/+11
| | | | | | | | | | | | | | | | | | We're going to be pulling in a chunk of code from NVGPU to fixup our SMID mappings on Volta and above, which depends on ppc_nr[gpc] reflecting the actual number of PPCs present, not the maximum number. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: switch to newer style interrupt handlerBen Skeggs2022-11-094-10/+26
| | | | | | | | | | | | | | Ampere. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: move some init to init_exception2()Ben Skeggs2022-11-0920-2/+32
| | | | | | | | | | | | | | Ampere. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: move some init to init_rop_exceptions()Ben Skeggs2022-11-0920-7/+37
| | | | | | | | | | | | | | Ampere. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: move reset during golden ctx init to fecs_reset()Ben Skeggs2022-11-0923-5/+36
| | | | | | | | | | | | | | Ampere. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: wfi after register-bashing golden initBen Skeggs2022-11-091-0/+2
| | | | | | | | | | | | | | Match RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: gpfifo_ctl zero before initBen Skeggs2022-11-091-0/+2
| | | | | | | | | | | | | | Match RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: wait for FE_PWR_MODE_AUTOBen Skeggs2022-11-091-0/+4
| | | | | | | | | | | | | | | | This doesn't fix any known issue, but RM started doing it at some point, so presumably it's needed for something. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: call FECS HALT_PIPE method before RC resetBen Skeggs2022-11-093-0/+46
| | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: call FECS WFI_GOLDEN_SAVE methodBen Skeggs2022-11-093-11/+39
| | | | | | | | | | | | | | | | | | This won't work on Ampere, and, it's questionable whether we should have been using our FW's method of storing the golden context image with NV's firmware to begin with. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: stop using NV_PGRAPH_FECS_CTXSW_MAILBOX_CLEARBen Skeggs2022-11-091-7/+7
| | | | | | | | | | | | | | | | This doesn't work on Ampere for some reason, switch to directly modifying NV_PGRAPH_FECS_CTXSW_MAILBOX instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: make global attrib_cb actually globalBen Skeggs2022-11-0923-269/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was thought to be per-channel initially - it's not. The backing pages for the VMM mappings are shared for all channels. - switches to more straight-forward patch interfaces - prepares for sub-context support - this is saving a *sizeable* amount of vram v2: - whitespace Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: move misc context patching out of attrib_cb funcsBen Skeggs2022-11-096-20/+51
| | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: make global bundle_cb actually globalBen Skeggs2022-11-098-37/+46
| | | | | | | | | | | | | | | | | | | | | | This was thought to be per-channel initially - it's not. The backing pages for the VMM mappings are shared for all channels. - switches to more straight-forward patch interfaces - prepares for sub-context support Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: make global pagepool actually globalBen Skeggs2022-11-099-50/+71
| | | | | | | | | | | | | | | | | | | | | | This was thought to be per-channel initially - it's not. The backing pages for the VMM mappings are shared for all channels. - switches to more straight-forward patch interfaces - prepares for sub-context support Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: generate golden context during first object allocBen Skeggs2022-11-093-49/+26
| | | | | | | | | | | | | | Needed for GV100 (and only GV100 for some reason) for WFI_GOLDEN_SAVE. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/gr/gf100-: move some code around to make next commits nicerBen Skeggs2022-11-091-52/+52
| | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/fifo: expose function to read engine ctxsw statusBen Skeggs2022-11-093-1/+18
| | | | | | | | | | | | | | Needed to support Ampere differences in gr/gf100-: Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/ltc: split color vs depth/stencil zbc countsBen Skeggs2022-11-0913-27/+42
| | | | | | | | | | | | | | These differ on Ampere. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/engine: add HAL for engine-specific rc reset procedureBen Skeggs2022-11-093-2/+14
| | | | | | | | | | | | | | Will be used to improve gr reset on GF100 and newer. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/sec2: dump tracepc info on haltBen Skeggs2022-11-093-0/+21
| | | | | | | | | | | | | | - useful to distinguish between different issues. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/acr: use common falcon HS FW code for ACR FWsBen Skeggs2022-11-0930-856/+648
| | | | | | | | | | | | | | | | | | | | | | Adds context binding and support for FWs with a bootloader to the code that was added to load VPR scrubber HS binaries, and ports ACR over to using all of it. - gv100 split from gp108 to handle FW exit status differences Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
* | drm/nouveau/fb/gp102-: unlock VPR right after devinitBen Skeggs2022-11-093-9/+16
| | | | | | | | | | | | | | | | | | | | Under memory load, instmem allocations could end up in the regions of VRAM that are inaccessible right after boot, and be corrupted after a suspend/resume cycle as a result of being restored before booting the mem unlock firmware. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>