summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_display.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/kms/nv50: add null check before pointer dereferenceGustavo A. R. Silva2017-06-061-1/+2
| | | | | | | | Add null check before dereferencing pointer asyc Addresses-Coverity-ID: 1397932 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Merge branch 'linux-4.12' of git://github.com/skeggsb/linux into drm-nextDave Airlie2017-05-121-14/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quite a few patches, but not much code changed: - Fixes regression from atomic when only the source rect of a plane changes (ie. xrandr --right-of) - Fixes another issue where atomic changed behaviour underneath us, potentially causing laggy cursor position updates - Fixes for a bunch of races in thermal code, which lead to random lockups for a lot of users * 'linux-4.12' of git://github.com/skeggsb/linux: drm/nouveau/therm: remove ineffective workarounds for alarm bugs drm/nouveau/tmr: avoid processing completed alarms when adding a new one drm/nouveau/tmr: fix corruption of the pending list when rescheduling an alarm drm/nouveau/tmr: handle races with hw when updating the next alarm time drm/nouveau/tmr: ack interrupt before processing alarms drm/nouveau/core: fix static checker warning drm/nouveau/fb/ram/gf100-: remove 0x10f200 read drm/nouveau/kms/nv50: skip core channel cursor update on position-only changes drm/nouveau/kms/nv50: fix source-rect-only plane updates drm/nouveau/kms/nv50: remove pointless argument to window atomic_check_acquire()
| * drm/nouveau/kms/nv50: skip core channel cursor update on position-only changesBen Skeggs2017-05-121-3/+7
| | | | | | | | | | | | | | | | | | | | The DRM core used to only call prepare_fb/cleanup_fb() when a plane's framebuffer changed, which achieved the desired effect. It's apparently now up to the driver to decide on its own. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org [4.11+]
| * drm/nouveau/kms/nv50: fix source-rect-only plane updatesBen Skeggs2017-05-121-5/+3
| | | | | | | | | | | | | | | | | | | | | | This "optimisation" (which was originally meant to skip updating cursor settings in the core channel on position-only updates) turned out to be pointless in the final design of the code before it was merged. Remove it completely, as it breaks other cases. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org [4.10+]
| * drm/nouveau/kms/nv50: remove pointless argument to window atomic_check_acquire()Ben Skeggs2017-05-121-7/+6
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | Merge tag 'drm-misc-next-2017-04-07' of ↵Dave Airlie2017-04-111-11/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/git/drm-misc into drm-next Last drm-misc-next pull req for 4.12 Core changes: - fb_helper checkpatch cleanup and simplified _add_one_connector() (Thierry) - drm_ioctl and drm_sysfs improved/gained documentation (Daniel) - [ABI] Repurpose reserved field in drm_event_vblank for crtc_id (Ander) - Plumb acquire ctx through legacy paths to avoid lock_all and legacy_backoff (Daniel) - Add connector_atomic_check to check conn constraints on modeset (Maarten) - Add drm_of_find_panel_or_bridge to remove boilerplate in drivers (Rob) Driver changes: - meson moved to drm-misc (Neil) - Added support for Amlogic GX SoCs in dw-hdmi (Neil) - Rockchip unbind actually cleans up the things bind initializes (Jeffy) - A couple misc fixes in virtio, dw-hdmi NOTE: this also includes a backmerge of drm-next as well rc5 (we needed vmwgfx as well as the new synopsys media formats) * tag 'drm-misc-next-2017-04-07' of git://anongit.freedesktop.org/git/drm-misc: (77 commits) Revert "drm: Don't allow interruptions when opening debugfs/crc" drm: Only take cursor locks when the cursor plane exists drm/vmwgfx: Fix fbdev emulation using legacy functions drm/rockchip: Shutdown all crtcs when unbinding drm drm/rockchip: Reorder drm bind/unbind sequence drm/rockchip: analogix_dp: Disable clock when unbinding drm/rockchip: vop: Unprepare clocks when unbinding drm/rockchip: vop: Enable pm domain before vop_initial drm/rockchip: cdn-dp: Don't unregister audio dev when unbinding drm/rockchip: cdn-dp: Don't try to release firmware when not loaded drm: bridge: analogix: Destroy connector & encoder when unbinding drm: bridge: analogix: Disable clock when unbinding drm: bridge: analogix: Unregister dp aux when unbinding drm: bridge: analogix: Detach panel when unbinding analogix dp drm: Don't allow interruptions when opening debugfs/crc drm/virtio: don't leak bo on drm_gem_object_init failure drm: bridge: dw-hdmi: fix input format/encoding from plat_data drm: omap: use common OF graph helpers drm: convert drivers to use drm_of_find_panel_or_bridge drm: convert drivers to use of_graph_get_remote_node ...
| * drm: Add acquire ctx to ->gamma_set hookDaniel Vetter2017-04-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Atomic helpers really want this instead of the hacked-up legacy backoff trick, which unfortunately prevents drivers from using their own private drm_modeset_locks. Aside: There's a few atomic drivers (nv50, vc4, soon vmwgfx) which don't yet use the new atomic color mgmt/gamma table stuff. Would be nice if they could switch over and just hook up drm_atomic_helper_legacy_gamma_set() instead. Cc: Dave Airlie <airlied@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Sinclair Yeh <syeh@vmware.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Eric Anholt <eric@anholt.net> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-13-daniel.vetter@ffwll.ch
| * drm/fb-helper: Give up on kgdb for atomic driversDaniel Vetter2017-04-061-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It just doesn't work. It probably stopped working way, way before that (e.g. i915 grabbed random mutexes all over in modeset code at least since gen6), but with atomic and all the ww_mutex stuff it's indeed hopeless. Remove ->mode_set_base_atomic from the 2 atomic drivers (i915 and nouveau) that still had one (both had dummy implementations already anyway), and shunt atomic drivers in the helpers debug_enter/leave functions. I'll leave the code in for radeon and amdgpu, but I think as soon as amdgpu is atomic we should think about just ripping it out. Only having it around for radeon and pre-nv50 is rather pointless. This would also allow us to nuke all that code from fbdev. Funny part is that _all_ kms drivers set this hook, despite that no one else provides the required ->mode_set_base_atomic implementation. The reason I'm jumping on this is that I want to wire up a full acquire ctx for the benefit of atomic drivers, everywhere. And the debug_enter/leave implementations call ->gamma_set. And there's just no way ever we can create an acquire_ctx in the nmi context of kgdb. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-11-daniel.vetter@ffwll.ch
* | drm/nouveau/kms/nv50: fix double dma_fence_put() when destroying plane stateBen Skeggs2017-04-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | When the atomic support was added to nouveau, the DRM core did not do this. However, later in the same merge window, a commit (drm/fence: add in-fences support) was merged that added it, leading to use-after-frees of the fence object. Cc: stable@vger.kernel.org [4.10+] Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/kms/nv50: fix setting of HeadSetRasterVertBlankDmi methodBen Skeggs2017-04-061-3/+5
|/ | | | | Cc: stable@vger.kernel.org [4.10+] Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux into ↵Daniel Vetter2017-03-231-2/+3
|\ | | | | | | | | | | | | | | | | drm-misc-next Resync with drm-next, I have a patch which currently can't be applied because drm-misc-next lacked the latest drm/i915 code. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
| * Merge branch 'linux-4.12' of git://github.com/skeggsb/linux into drm-nextDave Airlie2017-03-081-2/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Re-architecture of the code to handle proprietary fw, more abstracted to support the multitude of differences that NVIDIA introduce - Support in the said code for GP10x ACR and GR fw, giving acceleration support \o/ - Fix for GTX 970 GPUs that are in an odd MMU configuration * 'linux-4.12' of git://github.com/skeggsb/linux: (60 commits) drm/nouveau/fb/gf100-: rework ram detection drm/nouveau/fb/gm200: split ram implementation from gm107 drm/nouveau/fb/gf108: split implementation from gf100 drm/nouveau/fb/gf100-: modify constructors to allow more customisation drm/nouveau/kms/nv50: use drm core i2c-over-aux algorithm drm/nouveau/i2c/g94-: return REPLY_M value on reads drm/nouveau/i2c: modify aux interface to return length actually transferred drm/nouveau/gp10x: enable secboot and GR drm/nouveau/gr/gp102: initial support drm/nouveau/falcon: support for gp10x msgqueue drm/nouveau/secboot: add gp102/gp104/gp106/gp107 support drm/nouveau/secboot: put HS code loading code into own file drm/nouveau/secboot: support for r375 ACR drm/nouveau/secboot: support for r367 ACR drm/nouveau/secboot: support for r364 ACR drm/nouveau/secboot: workaround bug when starting SEC2 firmware drm/nouveau/secboot: support standard NVIDIA HS binaries drm/nouveau/secboot: support for unload blob bootloader drm/nouveau/secboot: let callers interpret return value of blobs drm/nouveau/secboot: support for different load and unload falcons ...
| | * drm/nouveau/kms/nv50: use drm core i2c-over-aux algorithmBen Skeggs2017-03-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | I'm not entirely sure NVKM needs to support this now, but I haven't removed it as of yet just in case it's needed from DEVINIT scripts where DRM isn't available. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | | drm/dp: Split drm_dp_mst_allocate_vcpiPandiyan, Dhinakaran2017-03-221-1/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm_dp_mst_allocate_vcpi() apart from setting up the vcpi structure, also finds if there are enough slots available. This check is a duplicate of that implemented in drm_dp_mst_find_vcpi_slots(). Let's move this check out and reuse the existing drm_dp_mst_find_vcpi_slots() function to check if there are enough vcpi slots before allocating them. This brings the check to one place. Additionally drivers that will use MST state tracking for atomic modesets can use the atomic version of find_vcpi_slots() and reuse drm_dp_mst_allocate_vcpi() Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1489648231-30700-4-git-send-email-dhinakaran.pandiyan@intel.com
* | gpu: drm: drivers: Convert printk(KERN_<LEVEL> to pr_<level>Joe Perches2017-03-011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a more common logging style. Miscellanea: o Coalesce formats and realign arguments o Neaten a few macros now using pr_<level> Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Rob Clark <robdclark@gmail.com> Acked-by: Sinclair Yeh <syeh@vmware.com> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/76355db47b31668bb64d996865ceee53bd66b11f.1488285953.git.joe@perches.com
* | Merge airlied/drm-next into drm-misc-nextDaniel Vetter2017-02-261-17/+23
|\ \ | |/ | | | | | | | | | | | | Backmerge the main pull request to sync up with all the newly landed drivers. Otherwise we'll have chaos even before 4.12 started in earnest. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
| * Merge tag 'v4.10-rc8' into drm-nextDave Airlie2017-02-231-0/+6
| |\ | | | | | | | | | | | | | | | | | | Linux 4.10-rc8 Backmerge Linus rc8 to fix some conflicts, but also to avoid pulling it in via a fixes pull from someone.
| | * drm/nouveau/kms/nv50: request vblank events for commits that send completion ↵Ben Skeggs2017-01-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | events This somehow fixes an issue where sync-to-vblank longer works correctly after resume from suspend. From a HW perspective, we don't need the IRQs turned on to be able to detect flip completion, so it's assumed that this is required for the voodoo in the core DRM vblank core. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau: allocate device object for every clientBen Skeggs2017-02-171-13/+13
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau: pass nvif_client to nouveau_bo_new() instead of drm_deviceBen Skeggs2017-02-171-2/+2
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | replace BUG_ON(1) with BUG()Ben Skeggs2017-02-171-2/+2
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | | drm/nouveau/kms/nv50: Switch to using atomic helper for flip.Andrey Grodzovsky2017-02-031-74/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | v2: Update code after flip_flags moved from plane_state to crtc_state v5: Rename to pageflip_flags. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Link: http://patchwork.freedesktop.org/patch/msgid/1486072591-3893-3-git-send-email-Andrey.Grodzovsky@amd.com
* | drm/dp: Store drm_device in MST topology managerDhinakaran Pandiyan2017-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | struct drm_dp_mst_topology_mgr currently stores a pointer to struct dev. Changing this to instead hold a pointer to drm_device is more useful as it gives access to DRM structures. This also makes it consistent with other DRM structures like drm_crtc, drm_connector etc. Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1485301777-3465-2-git-send-email-dhinakaran.pandiyan@intel.com
* | drm: Nuke fb->pixel_formatVille Syrjälä2016-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace uses of fb->pixel_format with fb->format->format. Less duplicated information is a good thing. Note that coccinelle failed to eliminate the "/* fourcc format */" comment from drm_framebuffer.h, so I had to do that part manually. @@ struct drm_framebuffer *FB; expression E; @@ drm_helper_mode_fill_fb_struct(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ i9xx_get_initial_plane_config(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ ironlake_get_initial_plane_config(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *FB; expression E; @@ skylake_get_initial_plane_config(...) { ... - FB->pixel_format = E; ... } @@ struct drm_framebuffer *a; struct drm_framebuffer b; @@ ( - a->pixel_format + a->format->format | - b.pixel_format + b.format->format ) @@ struct drm_plane_state *a; struct drm_plane_state b; @@ ( - a->fb->pixel_format + a->fb->format->format | - b.fb->pixel_format + b.fb->format->format ) @@ struct drm_crtc *CRTC; @@ ( - CRTC->primary->fb->pixel_format + CRTC->primary->fb->format->format | - CRTC->primary->state->fb->pixel_format + CRTC->primary->state->fb->format->format ) @@ struct drm_mode_set *set; @@ ( - set->fb->pixel_format + set->fb->format->format | - set->crtc->primary->fb->pixel_format + set->crtc->primary->fb->format->format ) @@ @@ struct drm_framebuffer { ... - uint32_t pixel_format; ... }; v2: Fix commit message (Laurent) Rebase due to earlier removal of many fb->pixel_format uses, including the 'fb->format = drm_format_info(fb->format->format);' snafu v3: Adjusted the semantic patch a bit and regenerated due to code changes Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1) Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: http://patchwork.freedesktop.org/patch/msgid/1481751175-18463-1-git-send-email-ville.syrjala@linux.intel.com
* | drm/nouveau: Use fb->format rather than drm_format_info()Ville Syrjälä2016-12-151-7/+5
|/ | | | | | | | | | Let's use the pointer to the format information cached under drm_framebuffer rather than look it up manually. Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-28-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/nouveau/kms/nv50: fix atomic regression on original G80Ben Skeggs2016-12-131-0/+5
| | | | | Reported-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: Fix atomic pageflip events.Mario Kleiner2016-11-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new atomic modesetting/pageflip code for nv50+ for Linux 4.10+ no longer uses pageflip irq's to signal flip completion. Instead it polls for flip completion from within a kthread/work queue. This creates a race between the vblank irq handler updating the vblank count and timestamp for the vblank of flip completion, and the kthread's polling code detecting flip completion and sending out the flip completion event. Depending on who executes a few microseconds earlier, the flip completion event will either contain correct count/timestamp or a stale count/timestamp from the previous vblank. This error was observed for about 50% of all executed flips, e.g., observable under DRI2 by the Xorg.log filling with flip handler warning messages. Call drm_accurate_vblank_count() before sending out flip completion events to enforce a vblank count/ts update for the vblank of flip completion and avoid stale counts/timestamps. This fix leads to one redundant call to drm_update_vblank_count for each completed flip, but no other side effects. On a ~6 year old Core i7 M620@ 2.67GHz the redundant call costs about 10 usecs per flip Successfully tested on GeForce 9500/9600/330M so far. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp/gp102: rename from gp104Ben Skeggs2016-11-171-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: avoid touching DP_MSTM_CTRL if !DP_MST_CAPBen Skeggs2016-11-171-2/+5
| | | | | | Fixes certain displays not being detected due to DPAUX errors. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: initial support for DP 1.2 multi-streamBen Skeggs2016-11-071-1/+553
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: allow encoder update to be called from other modulesBen Skeggs2016-11-071-44/+42
| | | | | | MST encoders will make use of this to share code with SOR> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: rename remaining nv50_crtc to nv50_headBen Skeggs2016-11-071-58/+55
| | | | | | No code changes, just renames + shuffles. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: remove code to create ctxdma for every framebufferBen Skeggs2016-11-071-71/+4
| | | | | | This is now handled by prepare_fb(). Legacy flips were the last user. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: remove code to support non-atomic page flipsBen Skeggs2016-11-071-194/+4
| | | | | | Made completely unreachable (and broken) by atomic commits. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: remove code to support non-atomic connector propertiesBen Skeggs2016-11-071-2/+0
| | | | | | Made completely unreachable by atomic commits. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: remove code to support non-atomic dpmsBen Skeggs2016-11-071-43/+1
| | | | | | Made completely unreachable (and broken) by atomic commits. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: remove code to support non-atomic modesetsBen Skeggs2016-11-071-386/+0
| | | | | | Make completely unreachable (and broken) by atomic commits. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: transition to atomic interfaces internallyBen Skeggs2016-11-071-88/+775
| | | | | | | | | | | | | | | | | | | | This commit implements the atomic commit interfaces, and implements the legacy modeset and page flipping interfaces on top of them. There's two major changes in behavior from before: - We're now making use of interlocks between core and satellite EVO channels, which greatly improves our ability to keep their states synchronised. - DPMS is now implemented as a full modeset to either tear down the entire pipe (or bring it back up). This choice was made mostly to ease the initial implementation, but I'm also not sure what we gain by bring backing the old behaviour. We shall see. This does NOT currently expose the atomic ioctl by default, due to limited testing having been performed. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: turn mode_set_base_atomic() into a stubBen Skeggs2016-11-071-3/+1
| | | | | | This cannot currently be supported with atomic modesettting. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: convert encoder mode_fixup into an atomic_check()Ben Skeggs2016-11-071-17/+53
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: clean-up encoder functionsBen Skeggs2016-11-071-136/+120
| | | | | | | | Just a shuffle of blocks into an order consistent with the rest of the code, renaming hdmi/audio funtions for atomic, and removal of unused code. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: ensure encoder normal power state is enabled at startupBen Skeggs2016-11-071-0/+19
| | | | | | | | | | | | | | | To handle low-power DPMS states, we currently change an OR's (Output Resource) normal (active) power state to be off, leaving the rest of the display configured as usual. Under atomic modesetting, we will instead be doing a full modeset to tear down the pipe fully when entering a low-power state. As we'll no longer be touching the OR's PWR registers during runtime operation, we need to ensure the normal power state is set correctly during initialisation. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: prepare ctxdma interface to be usable with atomicBen Skeggs2016-11-071-105/+92
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: separate out cursor channel commitBen Skeggs2016-11-071-40/+158
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: separate out base channel commitBen Skeggs2016-11-071-92/+743
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: separate out vblank dmi commitBen Skeggs2016-11-071-22/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: separate out procamp commitBen Skeggs2016-11-071-17/+50
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: separate out dither commitBen Skeggs2016-11-071-31/+70
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: separate out viewport commitBen Skeggs2016-11-071-93/+128
| | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms/nv50: separate out base/ovly channel usage bounds commitBen Skeggs2016-11-071-15/+71
| | | | | | | | | | | | | This commit separates the calculation of EVO state from the commit, in order to make the same code useful for atomic modesetting. The legacy interfaces have been wrapped on top of them. We're no longer touching the overlay channel usage bounds as of this commit. The code to do so is in place for when overlay planes are added. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud