- 31 3月, 2014 8 次提交
-
-
由 Rob Clark 提交于
After reading a nice article on LWN[1], I went back and double checked my handling of invalid-input checking. Turns out there were a couple places I had missed. Since the driver is fairly young, and the devices it supports are really only just barely usable for basic stuff (serial console) with an upstream kernel, I think we should fix this now and revert specific parts of this patch later in the unlikely event that a regression is reported. [1] https://lwn.net/Articles/588444/Signed-off-by: NRob Clark <robdclark@gmail.com>
-
由 Rob Clark 提交于
Signed-off-by: NRob Clark <robdclark@gmail.com>
-
由 Rob Clark 提交于
Some of the w/a or different behavior of userspace blob driver seem to be keyed to gpu patch revision, rather than gpu-id. So expose the full chip-id to userspace so it can DTRT. Signed-off-by: NRob Clark <robdclark@gmail.com>
-
由 Rob Clark 提交于
Shut down the clks when the gpu has nothing to do. A short inactivity timer is used to provide a low pass filter for power transitions. Signed-off-by: NRob Clark <robdclark@gmail.com>
-
由 Rob Clark 提交于
Helper macro to simplify places where we need to poll with timeout waiting for gpu. Signed-off-by: NRob Clark <robdclark@gmail.com>
-
由 Rob Clark 提交于
msm.hang_debug=y will dump out current register values if the gpu locks up, for easier debugging. Signed-off-by: NRob Clark <robdclark@gmail.com>
-
由 Rob Clark 提交于
Signed-off-by: NRob Clark <robdclark@gmail.com>
-
git://people.freedesktop.org/~thomash/linux由 Dave Airlie 提交于
vmwgfx render-node support and drm + ttm changes it depends upon. Pull request of 2014-03-28 * tag 'vmwgfx-next-2014-03-28' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Bump driver minor and date drm/vmwgfx: Enable render nodes drm/vmwgfx: Tighten the security around buffer maps drm/ttm: Add a ttm_ref_object_exists function drm/vmwgfx: Tighten security around surface sharing v2 drm/vmwgfx: Allow prime fds in the surface reference ioctls drm/vmwgfx: Drop authentication requirement on UNREF ioctls drm/vmwgfx: Reinstate and tighten security around legacy master model drm/vmwgfx: Use a per-device semaphore for reservation protection drm: Add a function to get the ioctl flags drm: Protect the master management with a drm_device::master_mutex v3 drm: Remove the minor master list drm: Improve on minor type helpers v3 drm: Make control nodes master-less v3 drm: Break out ioctl permission check to a separate function v2 drm: Have the crtc code only reference master from legacy nodes v2
-
- 28 3月, 2014 28 次提交
-
-
由 Thomas Hellstrom 提交于
Signal availability of prime fd reference ioctls and render nodes. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
Make sure only buffer objects that are referenced by the client can be mapped. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
A function to be used to check whether a caller has put a ref object (opened) a struct ttm_base_object Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
If using legacy (non-prime) surface sharing, only allow surfaces to be shared between clients with the same master. This will block malicious clients from peeking at contents at surfaces from other (possibly vt-switched) masters. v2: s/legacy_client/primary_client/ Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
Allow prime fds and at the same time block legacy handles for render-nodes in the surface reference ioctls. This means these ioctls can be used directly from prime-aware clients, and that they can be called from render-nodes. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
These ioctls will anyway only succeed if the client previously opened referenced the object. Furthermore, closing the client would implicitly execute the same action. This prevents clients from blocking on UNREF if their master dropped, and will allow masters to UNREF after dropping master privileges. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
The following restrictions affect clients connecting using legacy nodes: *) Masters that have dropped master privilieges are not considered authenticated until they regain master privileges. *) Clients whose master have dropped master privileges block interruptibly on ioctls requiring authentication until their master regains master privileges. If their master exits, they are killed. This is primarily designed to prevent clients authenticated with one master to access data from clients authenticated with another master. (Think fast user-switching or data sniffers enabled while X is vt-switched). Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
Don't use a per-master semaphore (ttm lock) for reservation protection, but rather a per-device semaphore. This is needed since clients connecting using render nodes aren't master aware. The ttm lock used should probably be replaced with a reader-write semaphore once the function down_xx_interruptible() is available. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
The master management was previously protected by the drm_device::struct_mutex. In order to avoid locking order violations in a reworked dropped master security check in the vmwgfx driver, break it out into a separate master_mutex. Locking order is master_mutex -> struct_mutex. Also remove drm_master::blocked since it's not used. v2: Add an inline comment about what drm_device::master_mutex is protecting. v3: Remove unneeded struct_mutex locks. Fix error returns in drm_setmaster_ioctl(). Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com> Acked-by: NDaniel Vetter <daniel@ffwll.ch>
-
由 Thomas Hellstrom 提交于
It doesn't appear to be used anywhere. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
-
由 Thomas Hellstrom 提交于
Add a drm_is_legacy() helper, constify argument to drm_is_render_client(), and use / change helpers where appropriate. v2: s/drm_is_legacy/drm_is_legacy_client/ and adapt to new code context. v3: s/legacy_client/primary_client/ Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com>
-
由 Thomas Hellstrom 提交于
Like for render-nodes, there is no point in maintaining the master concept for control nodes, so set the struct drm_file::master pointer to NULL. At the same time, make sure DRM_MASTER | DRM_CONTROL_ALLOW ioctls are always allowed when called through the control node. Previously the caller also needed to be master. v2: Adapt to refactoring of ioctl permission check. v3: Formatting of logical expression. Use drm_is_control_client() instead of drm_is_control(). Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NBrian Paul <brianp@vmware.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
-
由 Thomas Hellstrom 提交于
Helps reviewing and understanding these checks. v2: Remove misplaced newlines. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
-
由 Thomas Hellstrom 提交于
control- and render nodes are intended to be master-less. v2: Replace tests for !legacy with tests for !mode_group for readability. Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com> Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
-
由 Dave Airlie 提交于
/ssd/git/drm-next/drivers/gpu/drm/i915/i915_cmd_parser.c: In function ‘i915_parse_cmds’: /ssd/git/drm-next/drivers/gpu/drm/i915/i915_cmd_parser.c:405:4: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘int’ [-Wformat=] DRM_DEBUG_DRIVER("CMD: Command length exceeds batch length: 0x%08X length=%d batchlen=%ld\n", ^ Signed-off-by: NDave Airlie <airlied@redhat.com>
-
由 Lespiau, Damien 提交于
Right now a debug message looks like: [drm:drm_ioctl], pid=860, dev=0xe200, auth=1, DRM_IOCTL_MODE_GETCRTC That first comma looks weird as we already have ']' as a separator. Remove it. If anyone sees this commit message and also thinks that auth=1 isn't the most useful info to have here, let's just say I'd happily review a patch removing it. If I don't get annoyed enough to submit a patch, that is. Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
由 Lespiau, Damien 提交于
This is always DRM_NAME, so we can just make it part of the format string instead of asking prink to do it for us. Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
由 Lespiau, Damien 提交于
The DRM_LOG* macros where the only sites where drm_ut_debug_printk was called with NULL arguments for prefix and function_name. Now that they are gone, we can remove that case. Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
由 Lespiau, Damien 提交于
In the logging code, we are currently checking is we need to output in drm_ut_debug_printk(). This is too late. The problem is that when we write something like: DRM_DEBUG_DRIVER("ELD on [CONNECTOR:%d:%s], [ENCODER:%d:%s]\n", connector->base.id, drm_get_connector_name(connector), connector->encoder->base.id, drm_get_encoder_name(connector->encoder)); We start by evaluating the arguments (so call drm_get_connector_name() and drm_get_connector_name()) before ending up in drm_ut_debug_printk() which will then does nothing. This means we execute a lot of instructions (drm_get_connector_name(), in turn, calls snprintf() for example) to happily discard them in the normal case, drm.debug=0. So, let's put the test on drm_debug earlier, in the macros themselves. Sprinkle an unlikely() as well for good measure. Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
由 Lespiau, Damien 提交于
Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
由 Lespiau, Damien 提交于
There are only a few users of the DRM_LOG_KMS() macro. We can simplify the DRM code a bit by replacing them by DRM_DEBUG_KMS(). Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com> Acked-by: NPhilipp Zabel <p.zabel@pengutronix.de> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
由 Lespiau, Damien 提交于
There are only a few users of the DRM_LOG_KMS() macro. We can simplify the DRM code a bit by replacing them by DRM_DEBUG_KMS(). Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
由 Lespiau, Damien 提交于
There are only a few users of the DRM_LOG_KMS() macro. We can simplify the DRM code a bit by replacing them by DRM_DEBUG_KMS(). Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com> Acked-by: NPatrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
由 Lespiau, Damien 提交于
There are only a few users of the DRM_LOG_KMS() macro. We can simplify the DRM code a bit by replacing them by DRM_DEBUG_KMS(). Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
由 Lespiau, Damien 提交于
This macro was trying to use the non existing DRM_UT_MODE debug category and looks like it should be covered by DRM_LOG_KMS(). Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
由 Lespiau, Damien 提交于
That comment wasn't super-readable, so I tried to improve it: - Put the comment before the values it's documenting - Add a mention to PRIME - Reword things a bit to be a lighter read - Add a note about the option to set the debug value at run-time Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
- 27 3月, 2014 1 次提交
-
-
由 Arnd Bergmann 提交于
The recently added PTN3460 device driver uses interfaces that are provided by the KMS helper infrastructure, so we should explicitly select that to avoid this linker error: ERROR: "drm_helper_probe_single_connector_modes" [drivers/gpu/drm/bridge/ptn3460.ko] undefined! ERROR: "drm_helper_connector_dpms" [drivers/gpu/drm/bridge/ptn3460.ko] undefined! We have to drop the I2C dependency to avoid a circular dependency chain, but that's ok because DRM already selects I2C. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NDave Airlie <airlied@redhat.com>
-
- 26 3月, 2014 3 次提交
-
-
由 Dave Airlie 提交于
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next - first stage of (ongoing) gpu fault recovery work - initial support for maxwell (binary driver fw needed) - various random fixes across the board * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (87 commits) drm/nouveau: fix missing newline drm/nouveau/bios: fetch the vbios from PROM using only aligned 32-bit accesses drm/nouveau/therm: let the vbios decide on the automatic fan management mode drm/nvd7/therm: handle another kind of PWM fans drm/nouveau/pm/fan: drop the fan lock in fan_update() before rescheduling drm/nouveau: fix small thinko in vblank timestamping. drm/nouveau/therm: check for sensor presence with requested mode, not current drm/nouveau/disp/dp: allow 540MHz data rate drm/nouveau: recognise higher link rate for available dp bw calculations drm/nouveau/disp: limit dp capabilities as per dcb drm/nva3/fbram: restrict training pattern setup to GT218 drm/nva3/devinit: restrict script access to some PFB regs drm/nouveau/devinit: add interface to check if a mmio access by scripts is ok drm/nouveau/bios: have strap reads show on devinit spam debug level drm/nv50/gpio: fixup reset for gpios >= 16 drm/nv50/gpio: exclude sense value from mask when changing registers drm/gk104/gr: therm magic needed on some kepler boards drm/gm107/gr: initial support drm/gf100-/gf: fix a stupid typo, waiting on wrong signal for mmctx drm/nouveau/bios: parsing of some random table needed to bring up gr ...
-
由 Alexandre Courbot 提交于
Add a missing newline at the end of a DRM_INFO message. Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com> Reviewed-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
-
由 Martin Peres 提交于
Other kind of accesses are unreliable on Kepler cards. As advised by NVIDIA, let's only use 32-bit accesses to fetch the vbios from PROM. This fixes vbios fetching on my nve7 which failed in certain specific conditions. I suggest we Cc stable, for all kernels they still maintain after the big rewrite. Suggested-by: NChristian Zander <czander@nvidia.com> Signed-off-by: NMartin Peres <martin.peres@free.fr> Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
-