aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-01-20drm/i915: Fix scanoutpos calculations for interlaced modesVille Syrjälä1-0/+6
The scanline counter counts lines in the current field, not the entire frame. But the crtc_ timings are the values for the entire frame. Divide the vertical timings by 2 to make them match the scanline counter. The rounding was carefully chosen to make it do the right thing wrt. the observed scanline counter and ISR vblank bit behaviour. Reviewed-by: [email protected] Signed-off-by: Ville Syrjälä <[email protected]>
2014-01-20drm: Change {pixel,line,frame}dur_ns from s64 to intVille Syrjälä2-10/+10
Using s64 for the timestamping constants is wasteful. Signed 32bit integers get us a range of over +-2 seconds. Presuming that no-one wants to a vrefresh rate less than 0.5, we can switch to using int for the timestamping constants. We save a few bytes in drm_crtc and avoid a bunch of 64bit math. Reviewed-by: [email protected] Signed-off-by: Ville Syrjälä <[email protected]>
2014-01-20drm: Use crtc_clock in drm_calc_timestamping_constants()Ville Syrjälä1-1/+1
drm_calc_timestamping_constants() computes the pixel/line/frame durations based on the crtc_ timing values. The corresponding pixel clock is in mode->crtc_clock, so we need to use that instead of mode->clock. This should fix drm_calc_timestamping_constants() for frame packing stereo modes. Reviewed-by: [email protected] Signed-off-by: Ville Syrjälä <[email protected]>
2014-01-20drm/radeon: Populate crtc_clock in radeon_atom_get_tv_timings()Ville Syrjälä1-2/+4
crtc_clock is now supposed to be the actual pixel clock corresponding to the other crtc_ timing values. Populate crtc_clock appropriately in radeon_atom_get_tv_timings(). This was the only obvious place where we frob with the crtc_ timigns directly instead of calling drm_mode_set_crtcinfo() which would also update crtc_clock. Reviewed-by: [email protected] Signed-off-by: Ville Syrjälä <[email protected]>
2014-01-20drm: Simplify the math in drm_calc_timestamping_constants()Ville Syrjälä1-15/+11
drm_calc_timestamping_constants() makes the math more complex than necessary. - multipying the dotclock by 1000 is pointless, just makes all the numbers bigger - div64_u64() is also pointless, div_u64 is enough - pixeldur_ns doesn't need any 64bit math Reviewed-by: [email protected] Signed-off-by: Ville Syrjälä <[email protected]>
2014-01-20drm: Improve drm_calc_timestamping_constants() documentationVille Syrjälä1-7/+6
Move the long blurp to into the body of the comment, leaving only a short summary line at the top. Reviewed-by: [email protected] Signed-off-by: Ville Syrjälä <[email protected]>
2014-01-20drm/i915: Call drm_calc_timestamping_constants() earlierVille Syrjälä1-9/+8
Update the pixel/line/frame duration information when we switch to the new pipe config. This will keep the timestamping constants in better sync with the real hardware state. Reviewed-by: [email protected] Signed-off-by: Ville Syrjälä <[email protected]>
2014-01-20drm/i915: Kill hwmode save/restoreVille Syrjälä1-10/+3
drm core no longer uses crtc->hwmode, and neither does i915, so we can totally ignore it in i915. Reviewed-by: [email protected] Signed-off-by: Ville Syrjälä <[email protected]>
2014-01-20drm: Pass the display mode to drm_calc_vbltimestamp_from_scanoutpos()Ville Syrjälä4-6/+8
Rather than using crtc->hwmode, just pass the relevant mode to drm_calc_vbltimestamp_from_scanoutpos(). This removes the last hwmode usage from core drm. Reviewed-by: [email protected] Signed-off-by: Ville Syrjälä <[email protected]>
2014-01-20drm: Pass the display mode to drm_calc_timestamping_constants()Ville Syrjälä4-11/+14
We don't really use hwmode anymore in i915, so eliminating its use from the core code seems prudent. Just pass the appropriate mode to drm_calc_timestamping_constants(). Reviewed-by: [email protected] Signed-off-by: Ville Syrjälä <[email protected]>
2014-01-20Merge branch 'drm-intel-next' of ↵Dave Airlie542-3642/+5616
git://people.freedesktop.org/~danvet/drm-intel into drm-next drm-intel-next-2014-01-10: - final bits for runtime D3 on Haswell from Paul (now enabled fully) - parse the backlight modulation freq information in the VBT from Jani (but not yet used) - more watermark improvements from Ville for ilk-ivb and bdw - bugfixes for fastboot from Jesse - watermark fix for i830M (but not yet everything) - vlv vga hotplug w/a (Imre) - piles of other small improvements, cleanups and fixes all over Note that the pull request includes a backmerge of the last drm-fixes pulled into Linus' tree - things where getting a bit too messy. So the shortlog also contains a bunch of patches from Linus tree. Please yell if you want me to frob it for you a bit. * 'drm-intel-next' of git://people.freedesktop.org/~danvet/drm-intel: (609 commits) drm/i915/bdw: make sure south port interrupts are enabled properly v2 drm/i915: Include more information in disabled hotplug interrupt warning drm/i915: Only complain about a rogue hotplug IRQ after disabling drm/i915: Only WARN about a stuck hotplug irq ONCE drm/i915: s/hotplugt_status_gen4/hotplug_status_g4x/
2014-01-20Merge tag 'vmwgfx-next-2014-01-17' of ↵Dave Airlie19-373/+4716
git://people.freedesktop.org/~thomash/linux into drm-next Pull request of 2014-01-17 Pull request for 3.14. One not so urgent fix, One huge device update. The pull request corresponds to the patches sent out on dri-devel, except: [PATCH 02/33], review tag typo pointed out by Matt Turner. [PATCH 04/33], dropped. The new surface formats are never used. The upcoming vmware svga2 hardware version 11 will introduce the concept of "guest backed objects" or -resources. The device will in principle get all of its memory from the guest, which has big advantages from the device point of view. This means that vmwgfx contexts, shaders and surfaces need to be backed by guest memory in the form of buffer objects called MOBs, presumably short for MemoryOBjects, which are bound to the device in a special way. This patch series introduces guest backed object support. Some new IOCTLs are added to allocate these new guest backed object, and to optionally provide them with a backing MOB. There is an update to the gallium driver that comes with this update, and it will be pushed in the near timeframe presumably to a separate mesa branch before merged to master. * tag 'vmwgfx-next-2014-01-17' of git://people.freedesktop.org/~thomash/linux: (33 commits) drm/vmwgfx: Invalidate surface on non-readback unbind drm/vmwgfx: Silence the device command verifier drm/vmwgfx: Implement 64-bit Otable- and MOB binding v2 drm/vmwgfx: Fix surface framebuffer check for guest-backed surfaces drm/vmwgfx: Update otable definitions drm/vmwgfx: Use the linux DMA api also for MOBs drm/vmwgfx: Ditch the vmw_dummy_query_bo_prepare function drm/vmwgfx: Persistent tracking of context bindings drm/vmwgfx: Track context bindings and scrub them upon exiting execbuf drm/vmwgfx: Block the BIND_SHADERCONSTS command drm/vmwgfx: Add a parameter to get max MOB memory size drm/vmwgfx: Implement a buffer object synccpu ioctl. drm/vmwgfx: Make sure that the multisampling is off drm/vmwgfx: Extend the command verifier to handle guest-backed on / off drm/vmwgfx: Fix up the vmwgfx_drv.h header for new files drm/vmwgfx: Enable 3D for new hardware version drm/vmwgfx: Add new unused (by user-space) commands to the verifier drm/vmwgfx: Validate guest-backed shader const commands drm/vmwgfx: Add guest-backed shaders drm/vmwgfx: Hook up guest-backed surfaces ...
2014-01-17drm/vmwgfx: Invalidate surface on non-readback unbindJakob Bornecrantz1-8/+18
Fixes error messages in vmware.log Signed-off-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Michael Banack <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]>
2014-01-17drm/vmwgfx: Silence the device command verifierThomas Hellstrom1-7/+23
The device and kernel module disagrees about the command length of some commands. More pack attributes might be needed. Signed-off-by: Thomas Hellstrom <[email protected]>
2014-01-17drm/vmwgfx: Implement 64-bit Otable- and MOB binding v2Thomas Hellstrom3-25/+101
Adds the relevant commands to the device interface header and implements 64-bit binding for 64 bit VMs. v2: Uppercase command IDs, Correctly use also 64 bit page tables. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
2014-01-17drm/vmwgfx: Fix surface framebuffer check for guest-backed surfacesThomas Hellstrom1-3/+3
With guest-backed surfaces, surface->sizes == NULL, causing a kernel oops. Use the base_size member instead. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Brian Paul <[email protected]>
2014-01-17drm/vmwgfx: Update otable definitionsThomas Hellstrom3-11/+27
Update otable definitions and modify the otable setup code accordingly. Signed-off-by: Thomas Hellstrom <[email protected]>
2014-01-17drm/vmwgfx: Use the linux DMA api also for MOBsThomas Hellstrom3-41/+142
Signed-off-by: Thomas Hellstrom <[email protected]>
2014-01-17drm/vmwgfx: Ditch the vmw_dummy_query_bo_prepare functionThomas Hellstrom2-49/+37
Combine it with vmw_dummy_query_bo_create, and also make sure we use tryreserve when reserving the bo to avoid any lockdep warnings We are sure the tryreserve will always succeed since we are the only users at that point. In addition, allow the vmw_bo_pin function to pin/unpin system memory. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
2014-01-17drm/vmwgfx: Persistent tracking of context bindingsThomas Hellstrom7-10/+143
Only scrub context bindings when a bound resource is destroyed, or when the MOB backing the context is unbound. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Track context bindings and scrub them upon exiting execbufThomas Hellstrom3-11/+365
The device is no longer capable of scrubbing context bindings of resources that are bound when destroyed. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
2014-01-17drm/vmwgfx: Block the BIND_SHADERCONSTS commandThomas Hellstrom1-34/+2
It's been deprecated. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
2014-01-17drm/vmwgfx: Add a parameter to get max MOB memory sizeThomas Hellstrom3-2/+6
Also bump minor to signal a GB-aware kernel module Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Implement a buffer object synccpu ioctl.Thomas Hellstrom4-2/+211
This ioctl enables inter-process synchronization of buffer objects, which is needed for mesa Guest-Backed objects. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
2014-01-17drm/vmwgfx: Make sure that the multisampling is offZack Rusin2-2/+2
By default SVGA device creates nonmaskable multisampling surfaces, in which case multisampleCount of 1 means: the first quality setting of nonmaskable multisampling surface. Lets change it to make sure that the backends know that multisampling is really off. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
2014-01-17drm/vmwgfx: Extend the command verifier to handle guest-backed on / offThomas Hellstrom1-107/+208
Make sure we disallow commands if the device doesn't support them. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Fix up the vmwgfx_drv.h header for new filesThomas Hellstrom1-28/+42
Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Enable 3D for new hardware versionThomas Hellstrom1-0/+17
Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Add new unused (by user-space) commands to the verifierThomas Hellstrom1-0/+26
Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Validate guest-backed shader const commandsThomas Hellstrom1-0/+35
Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Add guest-backed shadersThomas Hellstrom5-1/+496
Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Hook up guest-backed surfacesThomas Hellstrom5-4/+708
Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Hook up guest-backed contextsThomas Hellstrom2-0/+227
Contexts are managed by the kernel only, so disable access to GB context commands from user-space Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Ruzin <[email protected]>
2014-01-17drm/vmwgfx: Detach backing store from its resources when it is evictedThomas Hellstrom1-1/+44
When the backing store buffer is evicted, Issue a readback from the resources and notify the resources that they are no longer bound to a valid backing store. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Hook up guest-backed queriesThomas Hellstrom3-14/+292
Perform a translation of legacy query commands should they occur in the command stream. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Add the possibility to validate a buffer as a MOBThomas Hellstrom3-7/+23
Also do basic consistency checking. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Read bounding box memory from the appropriate registerThomas Hellstrom1-2/+7
Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Hook up MOBs to TTM as a separate memory typeThomas Hellstrom5-13/+136
To bind a buffer object as a MOB, just validate it as a MOB memory type. We are reusing the GMRID manager, although we create a new instance of it to manage MOB ids and tomake sure we don't exceed the maximum amount of MOB pages. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
2014-01-17drm/vmwgfx: Add MOB managementThomas Hellstrom5-1/+632
Implement MOB setup, binding and unbinding, but don't hook up to TTM yet. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Adapt capability reporting to new hardware versionThomas Hellstrom1-3/+34
Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]> Conflicts: drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
2014-01-17drm/vmwgfx: Update the svga register definitionThomas Hellstrom2-2/+14
Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Replace vram_size with prim_bb_mem for calculation of max resolutionThomas Hellstrom4-2/+7
In the future, Scanout buffers need not be backed by VRAM and the two definitions will differ. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Update the driver user-space interface for guest-backed objectsThomas Hellstrom1-0/+199
Not hooked up yet. This is only the definition. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]> Conflicts: include/uapi/drm/vmwgfx_drm.h
2014-01-17drm/vmwgfx: Update the svga3d register header file for new device versionThomas Hellstrom1-14/+650
Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Zack Rusin <[email protected]>
2014-01-17drm/vmwgfx: Fix the driver for large dma addressesThomas Hellstrom3-169/+39
With dma compliance / IOMMU support added to the driver in kernel 3.13, the dma addresses can exceed 44 bits, which is what we support in 32-bit mode and with GMR1. So in 32-bit mode and optionally in 64-bit mode, restrict the dma addresses to 44 bits, and strip the old GMR1 code. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Cc: [email protected]
2014-01-16Merge commit origin/master into drm-intel-nextDaniel Vetter1015-5367/+10259
Conflicts are getting out of hand, and now we have to shuffle even more in -next which was also shuffled in -fixes (the call for drm_mode_config_reset needs to move yet again). So do a proper backmerge. I wanted to wait with this for the 3.13 relaese, but alas let's just do this now. Conflicts: drivers/gpu/drm/i915/i915_reg.h drivers/gpu/drm/i915/intel_ddi.c drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/i915/intel_pm.c Besides the conflict around the forcewake get/put (where we chaged the called function in -fixes and added a new parameter in -next) code all the current conflicts are of the adjacent lines changed type. Signed-off-by: Daniel Vetter <[email protected]>
2014-01-16drm/mgag200: fix oops in cursor code.Dave Airlie1-3/+5
In some cases we enter the cursor code with file_priv = NULL causing an oops, we also can try to unpin something that isn't pinned, and this is a good fix for it. Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2014-01-15Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds10-14/+29
Pull drm fixes from Dave Airlie: "One nouveau regression fix on older cards, i915 black screen fixes, and a revert for a strange G33 intel problem" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/nouveau: fix null ptr dereferences on some boards Revert "drm: copy mode type in drm_mode_connector_list_update()" drm/i915/bdw: make sure south port interrupts are enabled properly v2 drm/i915: Don't grab crtc mutexes in intel_modeset_gem_init() drm/i915: fix DDI PLLs HW state readout code
2014-01-15Merge branch 'drm-nouveau-next' of ↵Dave Airlie6-10/+17
git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes Single regression fix for nouveau * 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau: fix null ptr dereferences on some boards
2014-01-15drm/nouveau: fix null ptr dereferences on some boardsBen Skeggs6-10/+17
Regression from "device: populate master subdev pointer only when fully constructed" Reported-by: Bob Gleitsmann <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>