Thomas Hellstrom [Wed, 21 Nov 2012 10:06:22 +0000 (11:06 +0100)]
drm/vmwgfx: Hook up MOBs to TTM as a separate memory type
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 <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
Thomas Hellstrom [Wed, 21 Nov 2012 09:37:20 +0000 (10:37 +0100)]
drm/vmwgfx: Adapt capability reporting to new hardware version
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Zack Rusin <zackr@vmware.com>
Conflicts:
drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
Thomas Hellstrom [Wed, 21 Nov 2012 09:23:14 +0000 (10:23 +0100)]
drm/vmwgfx: Update the driver user-space interface for guest-backed objects
Not hooked up yet. This is only the definition.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Zack Rusin <zackr@vmware.com>
Conflicts:
include/uapi/drm/vmwgfx_drm.h
Thomas Hellstrom [Wed, 15 Jan 2014 19:19:53 +0000 (20:19 +0100)]
drm/vmwgfx: Fix the driver for large dma addresses
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 <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Cc: stable@vger.kernel.org
Rashika [Mon, 6 Jan 2014 15:20:38 +0000 (20:50 +0530)]
drivers: gpu: Include appropriate header file in r128_ioc32.c
Include appropriate header file drm/r128/r128_drv.h in
drm/r128/r128_ioc32.c because function r128_compat_ioctl() has its
prototype declaration in the header file.
This eliminates the following warning in drm/r128/r128_ioc32.c:
drivers/gpu/drm/r128/r128_ioc32.c:196:6: warning: no previous prototype for ‘r128_compat_ioctl’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 16:47:01 +0000 (22:17 +0530)]
drivers: gpu: Mark function as static in via_drv.c
Mark function as static because it is not used outside the file
drm/via/via_drv.c.
This eliminates the following warning in drm/via/via_drv.c:
drivers/gpu/drm/via/via_drv.c:49:6: warning: no previous prototype for ‘via_driver_postclose’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 16:41:59 +0000 (22:11 +0530)]
drivers: gpu: Mark function as static in sis_drv.c
Mark function as static because it is not used outside the file
drm/sis/sis_drv.c.
This eliminates the following warning in drm/sis/sis_drv.c:
drivers/gpu/drm/sis/sis_drv.c:97:6: warning: no previous prototype for ‘sis_driver_postclose’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 15:19:34 +0000 (20:49 +0530)]
drivers: gpu: Mark function as static in qxl_kms.c
Mark function qxl_device_init() as static in drm/qxl/qxl_kms.c because
it is not used outside this file.
This eliminates the following warning in drm/qxl/qxl_kms.c:
drivers/gpu/drm/qxl/qxl_kms.c:118:5: warning: no previous prototype for ‘qxl_device_init’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 15:03:56 +0000 (20:33 +0530)]
drivers: gpu: Include appropriate header file in mga_ioc32.c
Include appropriate header file drivers/gpu/drm/mga/mga_drv.h in
drm/mga/mga_ioc32.c because function mga_compat_ioctl() has its
prototype declaration in the header file.
This eliminates the following warning in drm/mga/mga_ioc32.c:
drivers/gpu/drm/mga/mga_ioc32.c:207:6: warning: no previous prototype for ‘mga_compat_ioctl’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 15:08:24 +0000 (20:38 +0530)]
drivers: gpu: Mark functions as static in mgag200_ttm.c
Mark functions mgag200_ttm_global_release(),
mgag200_ttm_bo_is_mgag200_bo() and mgag200_ttm_tt_create() as static in
drm/mgag200/mgag200_ttm.c because they are not used outside this file.
This eliminates the following warning in drm/mgag200/mgag200_ttm.c:
drivers/gpu/drm/mgag200/mgag200_ttm.c:84:1: warning: no previous prototype for ‘mgag200_ttm_global_release’ [-Wmissing-prototypes]
drivers/gpu/drm/mgag200/mgag200_ttm.c:105:6: warning: no previous prototype for ‘mgag200_ttm_bo_is_mgag200_bo’ [-Wmissing-prototypes]
drivers/gpu/drm/mgag200/mgag200_ttm.c:211:16: warning: no previous prototype for ‘mgag200_ttm_tt_create’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 15:07:15 +0000 (20:37 +0530)]
drivers: gpu: Mark functions as static in mgag200_mode.c
Mark functions mga_set_start_address(), mga_encoder_destroy() and
mga_connector_best_encoder() as static in drm/mgag200/mgag200_mode.c
because they are not used outside this file.
This eliminates the following warnings in drm/mgag200/mgag200_mode.c:
drivers/gpu/drm/mgag200/mgag200_mode.c:694:6: warning: no previous
prototype for ‘mga_set_start_address’ [-Wmissing-prototypes]
drivers/gpu/drm/mgag200/mgag200_mode.c:1401:6: warning: no previous
prototype for ‘mga_encoder_destroy’ [-Wmissing-prototypes]
drivers/gpu/drm/mgag200/mgag200_mode.c:1561:21: warning: no previous
prototype for ‘mga_connector_best_encoder’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 15:06:15 +0000 (20:36 +0530)]
drivers: gpu: Mark function as static in mgag200_main.c
Mark function mgag200_bo_unref() as static in drm/mgag200/mgag200_main.c
because it is not used outside this file.
This eliminates the following warning in drm/mgag200/mgag200_main.c:
drivers/gpu/drm/mgag200/mgag200_main.c:313:6: warning: no previous prototype for ‘mgag200_bo_unref’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 15:01:42 +0000 (20:31 +0530)]
drivers: gpu: Mark functions as static and remove unused function in cirrus_ttm.c
Mark functions cirrus_ttm_global_release(), cirrus_ttm_bo_is_cirrus_bo()
and cirrus_ttm_tt_create() as static in drm/cirrus/cirrus_ttm.c because
they are not used outside this file. Remove unused function
cirrus_bo_unpin() from drm/cirrus/cirrus_ttm.c.
This eliminates the following warnings in drm/cirrus/cirrus_ttm.c:
drivers/gpu/drm/cirrus/cirrus_ttm.c:84:1: warning: no previous prototype for ‘cirrus_ttm_global_release’ [-Wmissing-prototypes]
drivers/gpu/drm/cirrus/cirrus_ttm.c:105:6: warning: no previous prototype for ‘cirrus_ttm_bo_is_cirrus_bo’ [-Wmissing-prototypes]
drivers/gpu/drm/cirrus/cirrus_ttm.c:211:16: warning: no previous prototype for ‘cirrus_ttm_tt_create’ [-Wmissing-prototypes]
drivers/gpu/drm/cirrus/cirrus_ttm.c:378:5: warning: no previous prototype for ‘cirrus_bo_unpin’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 15:00:14 +0000 (20:30 +0530)]
drivers: gpu: Mark functions as static in cirrus_mode.c
Mark functions cirrus_set_start_address(), cirrus_encoder_destroy(),
cirrus_vga_get_modes() and cirrus_connector_best_encoder() as static in
drm/cirrus/cirrus_mode.c because they are not used outside this file.
This eliminates the following warnings in drm/cirrus/cirrus_mode.c:
drivers/gpu/drm/cirrus/cirrus_mode.c:105:6: warning: no previous
prototype for ‘cirrus_set_start_address’ [-Wmissing-prototypes]
drivers/gpu/drm/cirrus/cirrus_mode.c:456:6: warning: no previous
prototype for ‘cirrus_encoder_destroy’ [-Wmissing-prototypes]
drivers/gpu/drm/cirrus/cirrus_mode.c:495:5: warning: no previous
prototype for ‘cirrus_vga_get_modes’ [-Wmissing-prototypes]
drivers/gpu/drm/cirrus/cirrus_mode.c:512:21: warning: no previous
prototype for ‘cirrus_connector_best_encoder’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 14:59:12 +0000 (20:29 +0530)]
drivers: gpu: Mark function as static in cirrus_main.c
Mark function cirrus_bo_unref() as static in drm/cirrus/cirrus_main.c
because it is not used outside this file.
This eliminates the following warning in drm/cirrus/cirrus_main.c:
drivers/gpu/drm/cirrus/cirrus_main.c:258:6: warning: no previous
prototype for ‘cirrus_bo_unref’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 14:57:48 +0000 (20:27 +0530)]
drivers: gpu: Mark functions as static in ast_ttm.c
Mark functions ast_ttm_global_release(), ast_ttm_bo_is_ast_bo() and
ast_ttm_tt_create() as static in drm/ast/ast_ttm.c because they are not
used outside this file.
This eliminates the following warnings in drm/ast/ast_ttm.c:
drivers/gpu/drm/ast/ast_ttm.c:84:1: warning: no previous prototype for
‘ast_ttm_global_release’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_ttm.c:105:6: warning: no previous prototype for
‘ast_ttm_bo_is_ast_bo’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_ttm.c:211:16: warning: no previous prototype for
‘ast_ttm_tt_create’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 14:32:39 +0000 (20:02 +0530)]
drivers: gpu: Mark functions as static in ast_mode.c
Mark functions ast_set_sync_reg(), ast_set_dac_reg(),
ast_set_start_address_crt1(), ast_crtc_init(), ast_encoder_init(),
ast_connector_init(), ast_cursor_init(), ast_cursor_fini(),
ast_show_cursor() and ast_hide_cursor() as static in drm/ast/ast_mode.c
because they are not used outside this file.
This eliminates the following warning in drm/ast/ast_mode.c:
drivers/gpu/drm/ast/ast_mode.c:407:6: warning: no previous prototype for
‘ast_set_sync_reg’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_mode.c:418:6: warning: no previous prototype for
‘ast_set_dac_reg’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_mode.c:430:6: warning: no previous prototype for
‘ast_set_start_address_crt1’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_mode.c:626:5: warning: no previous prototype for
‘ast_crtc_init’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_mode.c:713:5: warning: no previous prototype for
‘ast_encoder_init’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_mode.c:780:5: warning: no previous prototype for
‘ast_connector_init’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_mode.c:813:5: warning: no previous prototype for
‘ast_cursor_init’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_mode.c:850:6: warning: no previous prototype for
‘ast_cursor_fini’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_mode.c:968:6: warning: no previous prototype for
‘ast_show_cursor’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_mode.c:979:6: warning: no previous prototype for
‘ast_hide_cursor’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 14:30:40 +0000 (20:00 +0530)]
drivers: gpu: Mark function as static and remove unused function in ast_main.c
Mark function ast_bo_unref() as static because it is not used outside
file ast_main.c and remove unused function ast_get_max_dclk() in
ast_main.c.
This eliminates the following warning in drm/ast/ast_main.c:
drivers/gpu/drm/ast/ast_main.c:192:10: warning: no previous prototype
for ‘ast_get_max_dclk’ [-Wmissing-prototypes]
drivers/gpu/drm/ast/ast_main.c:452:6: warning: no previous prototype for
‘ast_bo_unref’ [-Wmissing-prototypes]
Rashika [Mon, 6 Jan 2014 14:28:28 +0000 (19:58 +0530)]
drivers: gpu: Include appropriate header file in drm_usb.c
Include appropriate header file include/drm/drm_usb.h in drm/drm_usb.c
because functions drm_get_usb_dev(), drm_usb_init() and drm_usb_exit()
have their prototype declarations in the header file.
This eliminates the following warning in drm/drm_usb.c:
drivers/gpu/drm/drm_usb.c:5:5: warning: no previous prototype for
‘drm_get_usb_dev’ [-Wmissing-prototypes]
drivers/gpu/drm/drm_usb.c:61:5: warning: no previous prototype for
‘drm_usb_init’ [-Wmissing-prototypes]
drivers/gpu/drm/drm_usb.c:75:6: warning: no previous prototype for
‘drm_usb_exit’ [-Wmissing-prototypes]
Daniel Vetter [Wed, 11 Dec 2013 13:24:46 +0000 (14:24 +0100)]
drm: store the gem vma offset manager in a typed pointer
This was hidden in a generic void * dev->mm_private. But only ever
used for gem. But thanks to this fake generic pretension no one
noticed that Rob's drm drivers are now all broken.
So just give the offset manager a type pointer and fix up msm, omapdrm
and tilcdc.
v2: Fixup compile fail.
v3: Fixup rebase fail that David spotted.
Cc: David Herrmann <dh.herrmann@gmail.com> Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 14 Jan 2014 00:55:36 +0000 (10:55 +1000)]
Merge tag 'vmwgfx-next-2014-01-13' of git://people.freedesktop.org/~thomash/linux into drm-next
Anyway, nothing big here, Three more code cleanup patches from Rashika
Kheria, and one TTM/vmwgfx patch from me that tightens security around TTM
objects enough for them to opened using prime objects from render nodes:
Previously any client could access a shared buffer using the "name", also
without actually opening it. Now a reference is required, and for render nodes
such a reference is intended to only be obtainable using a prime fd.
vmwgfx-next 2014-01-13 pull request
* tag 'vmwgfx-next-2014-01-13' of git://people.freedesktop.org/~thomash/linux:
drivers: gpu: Mark functions as static in vmwgfx_fence.c
drivers: gpu: Mark functions as static in vmwgfx_buffer.c
drivers: gpu: Mark functions as static in vmwgfx_kms.c
drm/ttm: ttm object security fixes for render nodes
Dave Airlie [Tue, 14 Jan 2014 00:46:19 +0000 (10:46 +1000)]
Merge tag 'ttm-next-2014-01-13' of git://people.freedesktop.org/~thomash/linux into drm-next
Some code cleanup by Rashika Keria,
VM stuff for ttm:
-Use PFNMAP instead of MIXEDMAP where possible for performance
-Refuse to fault imported pages, an initial step to support dma-bufs
better from within TTM.
-Correctly set page mapping and -index members. These are needed in various
places in the vm subsystem that we are not using yet, but plan to use soonish:
For example unmap-mapping-range keeping COW pages, and dirty tracking
fbdefio style, but also for PCI memory.
ttm-next 2013-01-14 pull request
* tag 'ttm-next-2014-01-13' of git://people.freedesktop.org/~thomash/linux:
drivers: gpu: Remove unused function in ttm_lock.c
drivers: gpu: Mark function as static in ttm_bo_util.c
drivers: gpu: Mark function as static in ttm_bo.c
drm/ttm: Correctly set page mapping and -index members
drm/ttm: Refuse to fault (prime-) imported pages
drm/ttm: Use VM_PFNMAP for shared bo maps
Dave Airlie [Mon, 13 Jan 2014 03:55:48 +0000 (13:55 +1000)]
Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next
This pull request adds an anon file for exynos specific mmaper
to resolve potential a dead lock issue pointed out by Al Viro,
and fixes build break of drm-next.
* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
drm/exynos: fix build error caused by removed drm core macros
drm/exynos: use a new anon file for exynos gem mmaper
Dave Airlie [Mon, 13 Jan 2014 03:55:10 +0000 (13:55 +1000)]
Merge branch 'drm-next-3.14-wip' of git://people.freedesktop.org/~agd5f/linux into drm-next
This is the drm-next pull for radeon for 3.14. Highlights include:
- dpm rework which fixes some issues and allows us to enable dpm by
default on CIK parts
- enable clockgating on CIK parts
- pci config reset. This is a bus-level chip reset that can be more
reliable than soft reset in certain cases. Disabled by default. Enable
with the hard_reset module option.
- big endian rptr/wrptr update fixes
- lots of debugfs improvements
- some driver cleanup patches from Rashika Kheria
- bug fixes
* 'drm-next-3.14-wip' of git://people.freedesktop.org/~agd5f/linux: (50 commits)
drm/radeon: implement pci config reset for CIK (v3)
drm/radeon: implement pci config reset for SI (v2)
drm/radeon: implement pci config reset for evergreen/cayman (v2)
drm/radeon: implement pci config reset for r6xx/7xx (v3)
drm/radeon: add pci config hard reset
drm/radeon: add hard_reset module parameter
drm/radeon: skip colorbuffer checking if COLOR_INFO.FORMAT is set to INVALID
radeon/pm: Guard access to rdev->pm.power_state array
drivers: gpu: Move prototype declarations to header file radeon_mode.h from radeon_atombios.c and radeon_combios.c
drivers: gpu: Move prototype declaration to header file radeon_mode.h
drm/radeon: move com/atombios scratch reg functions to radeon_mode.h
drm/radeon/dpm: make some functions static for TN
drm/radeon/dpm: make some functions static for sumo
drm/radeon/dpm: make some functions static for CI
drivers: gpu: Include appropriate header file in ci_smc.c
drivers: gpu: Move prototype declaration to header file radeon_mode.h from atombios_i2c.c
drivers: gpu: Include appropriate header file in si_smc.c and remove prototype declaration from header file sislands_smc.h
drivers: gpu: Add static keyword to the definition of KMS_INVALID_IOCTL in radeon_kms.c
drivers: gpu: Mark function as static in r600_hdmi.c
drivers: gpu: Mark function as static in radeon_gem.c
...
Rob Clark [Thu, 5 Dec 2013 22:39:53 +0000 (17:39 -0500)]
drm/msm: add a330/apq8x74
Add support for adreno 330. Not too much different, just a few
differences in initial configuration plus setting OCMEM base.
Userspace support is already in upstream mesa.
Note that the existing DT code is simply using the bindings from
downstream android kernel, to simplify porting of this driver to
existing devices. These do not constitute any committed/stable
DT ABI. The addition of proper DT bindings will be a subsequent
patch, at which point (as best as possible) I will try to support
either upstream bindings or what is found in downstream android
kernel, so that existing device DT files can be used.
Unlike MDP4, it appears we can get by with a single encoder, rather
than needing a different implementation for DTV, DSI, etc. (Ie. the
register interface is same, just different bases.)
Also unlike MDP4, all the IRQs for other blocks (HDMI, DSI, etc) are
routed through MDP.
And finally, MDP5 has this "Shared Memory Pool" (called "SMP"), from
which blocks need to be allocated to the active pipes based on fetch
stride.
Rob Clark [Sun, 1 Dec 2013 17:12:54 +0000 (12:12 -0500)]
drm/msm: add hdmi support for apq8x74/mdp5
The HDMI block is basically the same between older SoC's with mdp4
display controller, and newer ones with mdp5.
So mostly this consists of better abstracting out the different sets of
regulators, clks, etc. In particular, for regulators and clks we can
split it up by what is needed for hot plug detect to work, and what is
needed to light up the display.
Also, 8x74 has a new phy.. a very simple one, but split out into a
different mmio space. And with mdp5, the irq is shared with mdp, so we
don't directly register our own irq handler.
Rob Clark [Sat, 16 Nov 2013 17:56:06 +0000 (12:56 -0500)]
drm/msm: add support for non-IOMMU systems
Add a VRAM carveout that is used for systems which do not have an IOMMU.
The VRAM carveout uses CMA. The arch code must setup a CMA pool for the
device (preferrably in highmem.. a 256m-512m VRAM pool in lowmem is not
cool). The user can configure the VRAM pool size using msm.vram module
param.
Technically, the abstraction of IOMMU behind msm_mmu is not strictly
needed, but it simplifies the GEM code a bit, and will be useful later
when I add support for a2xx devices with GPUMMU, so I decided to keep
this part.
It appears to be possible to configure the GPU to restrict access to
addresses within the VRAM pool, but this is not done yet. So for now
the GPU will refuse to load if there is no sort of mmu. Once address
based limits are supported and tested to confirm that we aren't giving
the GPU access to arbitrary memory, this restriction can be lifted
Alex Deucher [Wed, 8 Jan 2014 22:55:08 +0000 (17:55 -0500)]
drm/radeon: add hard_reset module parameter
Enabling this parameter enables pci config reset,
aka hard reset, which is a bus level chip reset.
In some cases this works more reliably than a soft
reset. Disabled by default.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Rashika Kheria [Mon, 6 Jan 2014 16:51:21 +0000 (22:21 +0530)]
drivers: gpu: Mark functions as static in vmwgfx_fence.c
Mark functions as static because they are not used outside the file
drm/vmwgfx/vmwgfx_fence.c.
This eliminates the following warnings in drm/vmwgfx/vmwgfx_fence.c:
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:274:6: warning: no previous prototype for ‘vmw_fences_perform_actions’ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:900:6: warning: no previous prototype for ‘vmw_fence_obj_add_action’ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:996:5: warning: no previous prototype for ‘vmw_event_fence_action_create’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 16:50:21 +0000 (22:20 +0530)]
drivers: gpu: Mark functions as static in vmwgfx_buffer.c
Mark functions as static because they are not used outside the file
drm/vmwgfx/vmwgfx_buffer.c.
This eliminates the following warnings in drm/vmwgfx/vmwgfx_buffer.c:
drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c:520:16: warning: no previous prototype for ‘vmw_ttm_tt_create’ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c:549:5: warning: no previous prototype for ‘vmw_invalidate_caches’ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c:554:5: warning: no previous prototype for ‘vmw_init_mem_type’ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c:592:6: warning: no previous prototype for ‘vmw_evict_flags’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 16:48:10 +0000 (22:18 +0530)]
drivers: gpu: Mark functions as static in vmwgfx_kms.c
Mark functions as static because they are not used outside the file
drm/vmwgfx/vmwgfx_kms.c.
This eliminates the following warnings in drm/vmwgfx/vmwgfx_kms.c:
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:43:6: warning: no previous prototype for ‘vmw_clip_cliprects’ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:426:6: warning: no previous prototype for ‘vmw_framebuffer_surface_destroy’ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:592:5: warning: no previous prototype for ‘vmw_framebuffer_surface_dirty’ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:757:6: warning: no previous prototype for ‘vmw_framebuffer_dmabuf_destroy’ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:943:5: warning: no previous prototype for ‘vmw_framebuffer_dmabuf_dirty’ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:1666:5: warning: no previous prototype for ‘vmw_du_update_layout’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 16:45:56 +0000 (22:15 +0530)]
drivers: gpu: Remove unused function in ttm_lock.c
Remove unused function ttm_write_lock_downgrade() from
drm/ttm/ttm_lock.c.
This eliminates the following warning in drm/ttm/ttm_lock.c:
drivers/gpu/drm/ttm/ttm_lock.c:189:6: warning: no previous prototype for ‘ttm_write_lock_downgrade’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 16:44:27 +0000 (22:14 +0530)]
drivers: gpu: Mark function as static in ttm_bo_util.c
Mark functions as static because they are not used outside the file
drm/ttm/ttm_bo_util.c.
This eliminates the following warnings in drm/ttm/ttm_bo_util.c:
drivers/gpu/drm/ttm/ttm_bo_util.c:190:5: warning: no previous prototype for ‘ttm_mem_reg_ioremap’ [-Wmissing-prototypes]
drivers/gpu/drm/ttm/ttm_bo_util.c:222:6: warning: no previous prototype for ‘ttm_mem_reg_iounmap’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 16:42:58 +0000 (22:12 +0530)]
drivers: gpu: Mark function as static in ttm_bo.c
Mark function as static because it is not used outside file
drm/ttm/ttm_bo.c.
This eliminates the following warning in drm/ttm/ttm_bo.c:
drivers/gpu/drm/ttm/ttm_bo.c:960:5: warning: no previous prototype for ‘ttm_bo_move_buffer’ [-Wmissing-prototypes]
Thomas Hellstrom [Wed, 18 Dec 2013 13:13:29 +0000 (14:13 +0100)]
drm/ttm: ttm object security fixes for render nodes
When a client looks up a ttm object, don't look it up through the device hash
table, but rather from the file hash table. That makes sure that the client
has indeed put a reference on the object, or in gem terms, has opened
the object; either using prime or using the global "name".
To avoid a performance loss, make sure the file hash table entries can be
looked up from under an RCU lock, and as a consequence, replace the rwlock
with a spinlock, since we never need to take it in read mode only anymore.
Finally add a ttm object lookup function for the device hash table, that is
intended to be used when we put a ref object on a base object or, in gem terms,
when we open the object.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
1) While it may work on some platforms / iommus, obtaining page pointers from
mapped sg-lists is illegal, since the DMA API allows page pointer information
to be destroyed in the sg mapping process.
2) TTM has no way of determining the linear kernel map caching state of the
underlying pages. PTEs with conflicting caching state pointing to the same
pfn is not allowed.
TTM operations touching pages of imported sg-tables should be redirected through
the proper dma-buf operations.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Acked-by: Daniel Vetter <daniel@ffwll.ch>
VM_PFNMAP is faster than VM_MIXEDMAP due to reduced page administration so
use it for shared maps where we don't have any Copy-On-Write pages. For
private maps, we continue to use VM_MIXEDMAP.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Rashika Kheria [Tue, 7 Jan 2014 18:06:31 +0000 (13:06 -0500)]
drivers: gpu: Move prototype declarations to header file radeon_mode.h from radeon_atombios.c and radeon_combios.c
Move prototype declarations of functions radeon_get_encoder_enum() and
radeon_link_encoder_connector() to header file drm/radeon/radeon_mode.h
because they are used by more than one file.
This eliminates the following warnings in drm/radeon/radeon_encoders.c:
drivers/gpu/drm/radeon/radeon_encoders.c:86:1: warning: no previous prototype for ‘radeon_get_encoder_enum’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_encoders.c:162:1: warning: no previous prototype for ‘radeon_link_encoder_connector’ [-Wmissing-prototypes]
Rashika Kheria [Tue, 7 Jan 2014 18:01:32 +0000 (13:01 -0500)]
drivers: gpu: Move prototype declaration to header file radeon_mode.h
Move prototype declaration of functions radeon_add_atom_connector() and
radeon_add_legacy_connector() to header file drm/radeon/radeon_mode.h
because they are used by more than one file.
This eliminates the following warning in drm/radeon/radeon_connectors.c:
drivers/gpu/drm/radeon/radeon_connectors.c:1588:1: warning: no previous prototype for ‘radeon_add_atom_connector’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_connectors.c:2020:1: warning: no previous prototype for ‘radeon_add_legacy_connector’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 16:35:34 +0000 (22:05 +0530)]
drivers: gpu: Include appropriate header file in ci_smc.c
Include header file drm/radeon/ci_dpm.h in drm/radeon/ci_smc.c because
it uses function declared in the header file.
This eliminates the following warnings in drm/radeon/ci_smc.c:
drivers/gpu/drm/radeon/ci_smc.c:46:5: warning: no previous prototype for ‘ci_copy_bytes_to_smc’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/ci_smc.c:113:6: warning: no previous prototype for ‘ci_start_smc’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/ci_smc.c:121:6: warning: no previous prototype for ‘ci_reset_smc’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/ci_smc.c:129:5: warning: no previous prototype for ‘ci_program_jump_on_start’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/ci_smc.c:136:6: warning: no previous prototype for ‘ci_stop_smc_clock’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/ci_smc.c:145:6: warning: no previous prototype for ‘ci_start_smc_clock’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/ci_smc.c:154:6: warning: no previous prototype for ‘ci_is_smc_running’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/ci_smc.c:165:14: warning: no previous prototype for ‘ci_send_msg_to_smc’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/ci_smc.c:186:14: warning: no previous prototype for ‘ci_wait_for_smc_inactive’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/ci_smc.c:204:5: warning: no previous prototype for ‘ci_load_smc_ucode’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/ci_smc.c:251:5: warning: no previous prototype for ‘ci_read_smc_sram_dword’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/ci_smc.c:266:5: warning: no previous prototype for ‘ci_write_smc_sram_dword’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 15:46:34 +0000 (21:16 +0530)]
drivers: gpu: Move prototype declaration to header file radeon_mode.h from atombios_i2c.c
Move prototype declaration of function radeon_atom_copy_swap() to header
file drm/radeon/radeon_mode.h because it is used by more than one file.
This eliminates the following warnings in drm/radeon/atombios_dp.c:
drivers/gpu/drm/radeon/atombios_dp.c:53:6: warning: no previous prototype for ‘radeon_atom_copy_swap’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 16:30:45 +0000 (22:00 +0530)]
drivers: gpu: Include appropriate header file in si_smc.c and remove prototype declaration from header file sislands_smc.h
Include header file gpu/drm/radeon/sislands_smc.h in drm/radeon/si_smc.c
because it uses function declared in the header file.
Remove prototype declaration of function si_set_smc_sram_address() from
drm/radeon/sislands_smc.h because the function is used only in one file
where it is declared static already.
This eliminates the following warnings in drm/radeon/si_smc.c:
drivers/gpu/drm/radeon/si_smc.c:46:5: warning: no previous prototype for ‘si_copy_bytes_to_smc’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_smc.c:112:6: warning: no previous prototype for ‘si_start_smc’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_smc.c:121:6: warning: no previous prototype for ‘si_reset_smc’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_smc.c:135:5: warning: no previous prototype for ‘si_program_jump_on_start’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_smc.c:142:6: warning: no previous prototype for ‘si_stop_smc_clock’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_smc.c:151:6: warning: no previous prototype for ‘si_start_smc_clock’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_smc.c:160:6: warning: no previous prototype for ‘si_is_smc_running’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_smc.c:171:14: warning: no previous prototype for ‘si_send_msg_to_smc’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_smc.c:192:14: warning: no previous prototype for ‘si_wait_for_smc_inactive’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_smc.c:210:5: warning: no previous prototype for ‘si_load_smc_ucode’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_smc.c:269:5: warning: no previous prototype for ‘si_read_smc_sram_dword’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/si_smc.c:284:5: warning: no previous prototype for ‘si_write_smc_sram_dword’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 15:36:44 +0000 (21:06 +0530)]
drivers: gpu: Add static keyword to the definition of KMS_INVALID_IOCTL in radeon_kms.c
Add static keyword to the definition of KMS_INVALID_IOCTL(name) in
radeon_kms.c because the functions passed to it as arguments are not
used anywhere else.
This eliminates the following warnings in drm/radeon/radeon_kms.c:
drivers/gpu/drm/radeon/radeon_kms.c:719:1: warning: no previous prototype for ‘radeon_cp_init_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:720:1: warning: no previous prototype for ‘radeon_cp_start_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:721:1: warning: no previous prototype for ‘radeon_cp_stop_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:722:1: warning: no previous prototype for ‘radeon_cp_reset_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:723:1: warning: no previous prototype for ‘radeon_cp_idle_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:724:1: warning: no previous prototype for ‘radeon_cp_resume_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:725:1: warning: no previous prototype for ‘radeon_engine_reset_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:726:1: warning: no previous prototype for ‘radeon_fullscreen_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:727:1: warning: no previous prototype for ‘radeon_cp_swap_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:728:1: warning: no previous rototype for ‘radeon_cp_clear_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:729:1: warning: no previous prototype for ‘radeon_cp_vertex_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:730:1: warning: no previous rototype for ‘radeon_cp_indices_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:731:1: warning: no previous prototype for ‘radeon_cp_texture_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:732:1: warning: no previous prototype for ‘radeon_cp_stipple_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:733:1: warning: no previous prototype for ‘radeon_cp_indirect_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:734:1: warning: no previous prototype for ‘radeon_cp_vertex2_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:735:1: warning: no previous prototype for ‘radeon_cp_cmdbuf_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:736:1: warning: no previous prototype for ‘radeon_cp_getparam_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:737:1: warning: no previous prototype for ‘radeon_cp_flip_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:738:1: warning: no previous prototype for ‘radeon_mem_alloc_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:739:1: warning: no previous prototype for ‘radeon_mem_free_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:740:1: warning: no previous rototype for ‘radeon_mem_init_heap_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:741:1: warning: no previous rototype for ‘radeon_irq_emit_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:742:1: warning: no previous prototype for ‘radeon_irq_wait_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:743:1: warning: no previous rototype for ‘radeon_cp_setparam_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:744:1: warning: no previous prototype for ‘radeon_surface_alloc_kms’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_kms.c:745:1: warning: no previous prototype for ‘radeon_surface_free_kms’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 15:48:08 +0000 (21:18 +0530)]
drivers: gpu: Mark function as static in r600_hdmi.c
Mark function r600_audio_set_dto() as static in drm/radeon/r600_hdmi.c
because it is not used outside this file.
This eliminates the following warning in drm/radeon/r600_hdmi.c:
drivers/gpu/drm/radeon/r600_hdmi.c:253:6: warning: no previous prototype for ‘r600_audio_set_dto’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 15:28:45 +0000 (20:58 +0530)]
drivers: gpu: Mark function as static in radeon_gem.c
Mark function radeon_gem_set_domain() as static in
drm/radeon/radeon_gem.c because it is not used outside this file.
This eliminates the following warning in drm/radeon/radeon_gem.c:
drivers/gpu/drm/radeon/radeon_gem.c:89:5: warning: no previous prototype for ‘radeon_gem_set_domain’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 15:23:07 +0000 (20:53 +0530)]
drivers: gpu: Mark function as static in radeon_kms.c
Mark function radeon_info_ioctl() as static in drm/radeon/radeon_kms.c
because it is not used outside this file.
This eliminates the following warning in drm/radeon/radeon_kms.c:
drivers/gpu/drm/radeon/radeon_kms.c:194:5: warning: no previous prototype for ‘radeon_info_ioctl’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 15:21:40 +0000 (20:51 +0530)]
drivers: gpu: Mark functions as static in radeon_device.c
Mark functions radeon_doorbell_init() and radeon_doorbell_fini() as
static in drm/radeon/radeon_device.c because they are not used outside
this file.
This eliminates the following warning in drm/radeon/radeon_device.c:
drivers/gpu/drm/radeon/radeon_device.c:252:5: warning: no previous prototype for ‘radeon_doorbell_init’ [-Wmissing-prototypes]
drivers/gpu/drm/radeon/radeon_device.c:281:6: warning: no previous prototype for ‘radeon_doorbell_fini’ [-Wmissing-prototypes]
Rashika Kheria [Mon, 6 Jan 2014 15:25:28 +0000 (20:55 +0530)]
drivers: gpu: Mark function as static in radeon_object.c
Mark function radeon_bo_clear_va() as static in
drm/radeon/radeon_object.c because it is not used outside this file.
This eliminates the following warning in drm/radeon/radeon_object.c:
drivers/gpu/drm/radeon/radeon_object.c:49:6: warning: no previous prototype for ‘radeon_bo_clear_va’ [-Wmissing-prototypes]
Alex Deucher [Tue, 7 Jan 2014 15:05:02 +0000 (10:05 -0500)]
drm/radeon: warn users when hw_i2c is enabled (v2)
The hw i2c engines are disabled by default as the
current implementation is still experimental. Print
a warning when users enable it so that it's obvious
when the option is enabled.
v2: check for non-0 rather than 1
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org
Inki Dae [Fri, 20 Dec 2013 10:16:24 +0000 (19:16 +0900)]
drm/exynos: use a new anon file for exynos gem mmaper
This patch resolves potential deadlock issue that can be incurred
by changing file->f_op and filp->private_data to exynos specific
mapper ops and gem object temporarily.
To resolve this issue, this patch creates a new anon file dedicated
to exynos specific mmaper, and making it used instead of existing one.
Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Fill in asic family specific versions rather than
using the generic version. This lets us handle asic
specific differences more easily. In this case, we
disable sw swapping of the rtpr writeback value on
r6xx+ since the hw does it for us. Fixes bogus
rptr readback on BE systems.
v2: remove missed cpu_to_le32(), add comments
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Wed, 18 Dec 2013 19:07:14 +0000 (14:07 -0500)]
drm/radeon/pm: move pm handling into the asic specific code
We need more control over the ordering of dpm init with
respect to the rest of the asic. Specifically, the SMC
has to be initialized before the rlc and cg/pg. The pm
code currently initializes late in the driver, but we need
it to happen much earlier so move pm handling into the asic
specific callbacks.
This makes dpm more reliable and makes clockgating work
properly on CIK parts and should help on SI parts as well.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Thu, 19 Dec 2013 21:17:47 +0000 (16:17 -0500)]
drm/radeon/dpm: switch on new late_enable callback
Right now it's called right after enable, but after
reworking the dpm init order, it will get called later
to accomodate loading the smc early, but enabling
thermal interrupts and block powergating later after
the ring tests are complete.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>