summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2013-09-05395-16644/+48272
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull drm tree changes from Dave Airlie: "This is the main drm pull request, I have some overlap with sound and arm-soc, the sound patch is acked and may conflict based on -next reports but should be a trivial fixup, which I'll leave to you! Highlights: - new drivers: MSM driver from Rob Clark - non-drm: switcheroo and hdmi audio driver support for secondary GPU poweroff, so drivers can use runtime PM to poweroff the GPUs. This can save 5 or 6W on some optimus laptops. - drm core: combined GEM and TTM VMA manager per-filp mmap permission tracking initial rendernode support (via a runtime enable for now, until we get api stable), remove old proc support, lots of cleanups of legacy code hdmi vendor infoframes and 4k modes lots of gem/prime locking and races fixes async pageflip scaffolding drm bridge objects - i915: Haswell PC8+ support and eLLC support, HDMI 4K support, initial per-process VMA pieces, watermark reworks, convert to generic hdmi infoframes, encoder reworking, fastboot support, - radeon: CIK PM support, remove 3d blit code in favour of DMA engines, Berlin GPU support, HDMI audio fixes - nouveau: secondary GPU power down support for optimus laptops, lots of fixes, use MSI, VP3 engine support - exynos: runtime pm support for g2d, DT support, remove non-DT, - tda998x i2c driver: lots of fixes for sync issues - gma500: lots of cleanups - rcar: add LVDS support, fbdev emulation, - tegra: just minor fixes" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (684 commits) drm/exynos: Fix build error with exynos_drm_connector.c drm/exynos: Remove non-DT support in exynos_drm_fimd drm/exynos: Remove non-DT support in exynos_hdmi drm/exynos: Remove non-DT support in exynos_drm_g2d drm/exynos: Remove non-DT support in exynos_hdmiphy drm/exynos: Remove non-DT support in exynos_ddc drm/exynos: Make Exynos DRM drivers depend on OF drm/exynos: Consider fallback option to allocation fail drm/exynos: fimd: move platform data parsing to separate function drm/exynos: fimd: get signal polarities from device tree drm/exynos: fimd: replace struct fb_videomode with videomode drm/exynos: check a pixel format to a particular window layer drm/exynos: fix fimd pixel format setting drm/exynos: Add NULL pointer check drm/exynos: Remove redundant error messages drm/exynos: Add missing of.h header include drm/exynos: Remove redundant NULL check in exynos_drm_buf drm/exynos: add device tree support for rotator drm/exynos: Add missing includes drm/exynos: add runtime pm interfaces to g2d driver ...
| * drm/exynos: Fix build error with exynos_drm_connector.cSachin Kamat2013-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | exynos_drm_connector.c now uses videomode helper API. Hence select VIDEOMODE_HELPERS at DRM_EXYNOS level itself instead of at DRM_EXYNOS_FIMD to avoid the following compilation error when FIMD is not selected (introduced by commit cf796235a6 "drm/exynos: fimd: replace struct fb_videomode with videomode"): drivers/built-in.o: In function `exynos_drm_connector_get_modes': drivers/gpu/drm/exynos/exynos_drm_connector.c:86: undefined reference to `drm_display_mode_from_videomode' Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Remove non-DT support in exynos_drm_fimdSachin Kamat2013-09-051-53/+21Star
| | | | | | | | | | | | | | | | | | Since commit 383ffda2fa ("ARM: EXYNOS: no more support non-DT for EXYNOS SoCs"), Exynos platform is DT only. Hence remove all the conditional macros and make the driver DT only. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Remove non-DT support in exynos_hdmiSachin Kamat2013-09-051-58/+12Star
| | | | | | | | | | | | | | | | | | Since commit 383ffda2fa ("ARM: EXYNOS: no more support non-DT for EXYNOS SoCs"), Exynos platform is DT only. Hence remove all the conditional macros and make the driver DT only. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Remove non-DT support in exynos_drm_g2dSachin Kamat2013-09-051-3/+1Star
| | | | | | | | | | | | | | | | | | Since commit 383ffda2fa ("ARM: EXYNOS: no more support non-DT for EXYNOS SoCs"), Exynos platform is DT only. Hence remove all the conditional macros and make the driver DT only. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Remove non-DT support in exynos_hdmiphySachin Kamat2013-09-051-10/+1Star
| | | | | | | | | | | | | | | | | | Since commit 383ffda2fa ("ARM: EXYNOS: no more support non-DT for EXYNOS SoCs"), Exynos platform is DT only. Hence remove all the conditional macros and make the driver DT only. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Remove non-DT support in exynos_ddcSachin Kamat2013-09-051-10/+1Star
| | | | | | | | | | | | | | | | | | Since commit 383ffda2fa ("ARM: EXYNOS: no more support non-DT for EXYNOS SoCs"), Exynos platform is DT only. Hence remove all the conditional macros and make the driver DT only. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Make Exynos DRM drivers depend on OFSachin Kamat2013-09-051-2/+2
| | | | | | | | | | | | | | Exynos is a DT-only platform. Add this info to Kconfig. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Consider fallback option to allocation failVikas Sajjan2013-09-051-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | To address the case where physically contiguous memory MAY NOT be a mandatory requirement for framebuffer for the application calling exynos_drm_gem_dumb_create, the patch adds a feature to get non physically contiguous memory for framebuffer, if physically contiguous memory allocation fails and if IOMMU is supported. Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> Signed-off-by: Arun Kumar <arun.kk@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: fimd: move platform data parsing to separate functionAndrzej Hajda2013-09-051-32/+31Star
| | | | | | | | | | | | | | | | | | The patch moves platfrom_data and device tree parsing to separate function. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: fimd: get signal polarities from device treeAndrzej Hajda2013-09-051-0/+9
| | | | | | | | | | | | | | | | | | The patch adds code to get signal polarization setting from device tree display-timings node. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: fimd: replace struct fb_videomode with videomodeAndrzej Hajda2013-09-052-96/+68Star
| | | | | | | | | | | | | | | | | | | | | | The patch replaces all occurrences of struct fb_videomode by more accurate struct videomode. The change allows to remove mode conversion function and simplifies clock divider calculation. Clock configuration is moved to separate function. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: check a pixel format to a particular window layerInki Dae2013-09-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | This patch checks if a requested window supports alpha channel or not. In case of s3c64xx, window 0 doesn't support alpha channel so if the request pixel format is ARGB8888 then change it to XRGB8888. Signed-off-by: Inki Dae <inki.dae@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: fix fimd pixel format settingInki Dae2013-09-051-21/+13Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes wrong pixel format setting. A pixel format is decided according to bpp and depth, or user-requested format but fimd driver considered only bpp value to decide a proper pixel format. So this patch makes a proper pixel format to be set according to drm_framebuffer's pixel_format which is set by addfb with bpp and depth, or addfb2 with user-requested format. Signed-off-by: Inki Dae <inki.dae@samsung.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: Add NULL pointer checkSachin Kamat2013-09-051-0/+9
| | | | | | | | | | | | | | | | devm_kzalloc can fail. Hence check the pointer to avoid NULL pointer dereferencing. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Remove redundant error messagesSachin Kamat2013-09-0519-96/+30Star
| | | | | | | | | | | | | | | | kzalloc already has built-in error messages. Hence remove additional ones. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Add missing of.h header includeSachin Kamat2013-09-056-1/+6
| | | | | | | | | | | | | | Add of.h explicitly for of_* APIs. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Remove redundant NULL check in exynos_drm_bufSachin Kamat2013-09-051-5/+0Star
| | | | | | | | | | | | | | kfree handles null pointers. Hence this check is not necessary. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: add device tree support for rotatorChanho Park2013-09-051-28/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The exynos4 platform is only dt-based since 3.10, we should convert driver data and ids to dt-based parsing methods. The rotator driver has a limit table to get size limit of input picture. Each SoCs has slightly different limit value compared with any others. For example, exynos4210's max_size of RGB888 is 16k x 16k. But, others have 8k x 8k. Another example the exynos5250 should have multiple of 2 pixel size for its X/Y axis. Thus, we should keep different tables for each of them. This patch also includes desciptions of each nodes for the rotator and specifies a example how to bind it. Signed-off-by: Chanho Park <chanho61.park@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: Add missing includesMark Brown2013-09-0510-0/+10
| | | | | | | | | | | | | | | | | | Ensure that all externally accessed functions are correctly prototyped when defined in each file by making sure the headers with the protoypes are included in the file with the definition. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/exynos: add runtime pm interfaces to g2d driverInki Dae2013-09-051-12/+28
| | | | | | | | | | | | | | | | | | This patch makes g2d power domain and clock to be controlled through pm runtime interfaces instead of controlling them respectively. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: Add fallback option to get non physically contiguous memory for fbVikas Sajjan2013-09-051-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While trying to get boot-logo up on exynos5420 SMDK which has eDP panel connected with resolution 2560x1600, following error occured even with IOMMU enabled: [0.880000] [drm:lowlevel_buffer_allocate] *ERROR* failed to allocate buffer. [0.890000] [drm] Initialized exynos 1.0.0 20110530 on minor 0 To address the cases where physically contiguous memory MAY NOT be a mandatory requirement for fb, the patch adds a feature to get non physically contiguous memory for fb if physically contiguous memory allocation fails and if IOMMU is supported. Signed-off-by: Vikas Sajjan <vikas.sajjan@linaro.org> Signed-off-by: Arun Kumar <arun.kk@samsung.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * drm/tda998x: BUG() on invalid audio formatDavid Herrmann2013-09-051-0/+4
| | | | | | | | | | | | | | | | | | Suppress warning of unused-variables by adding a BUG()+return for invalid audio-formats. Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
| * drm/radeon: protect ACPI calls with CONFIG_ACPIStephen Rothwell2013-09-051-0/+4
| | | | | | | | | | | | Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Alex Deucher <Alexander.Deucher@amd.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
| * drm/nouveau: fix command submission to use vmalloc for big allocationsMaarten Lankhorst2013-09-041-7/+20
| | | | | | | | | | | | | | | | | | | | I was getting a order 4 allocation failure from kmalloc when testing some game after a few days uptime with some suspend/resumes. For big allocations vmalloc should be used instead. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5)Martin Peres2013-09-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some vbioses have extra useless entries after "the end" of the table. This is problematic since all of the vbios I found with this issue redefine the pwm freq divider to insane levels (52750 Hz instead of 2500), thus breaking fan management. The first solution to solve this mess would be to change the length of the table. The solution I choose was simply to avoid setting the pwm freq twice as the other redefinitions are harmless with our current parser. Signed-off-by: Martin Peres <martin.peres@labri.fr> Reported-by: Mariusz Bialonczyk <manio@skyboo.net> Tested-by: Mariusz Bialonczyk <manio@skyboo.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: use MSI interruptsLucas Stach2013-09-043-1/+25
| | | | | | | | | | | | | | | | | | | | | | MSIs were only problematic on some old, broken chipsets. But now that we already see systems where PCI legacy interrupts are somewhat flaky, it's really time to move to MSIs. v2 (Ben Skeggs): blacklist BR02 boards Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv50-/kms: assume analog display connected if load on any pinBen Skeggs2013-09-041-1/+1
| | | | | | | | | | | | | | Fixes a VGA monitor with a dodgy red (in this case) pin not being detected. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv50/disp: prevent false output detection on the original nv50Emil Velikov2013-09-041-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ea9197cc323839ef3d5280c0453b2c622caa6bc7 effectively enabled the use of an improved DAC detection code, but introduced a regression on the original nv50 chipset, causing a ghost monitor to be detected. v2 (Ben Skeggs): the offending line was likely a thinko, removed it for all chipsets (tested nv50 and nve6 to cover entire range) and added some additional debugging. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67382 Tested-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Cc: <stable@vger.kernel.org> # 3.9+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/i2c: pass the function pointers in at creation timeIlia Mirkin2013-09-048-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | i2c_bit_add_bus can call the pre_xfer function, which expects the func pointer to be set. Pass in func to the port creation logic so that it is set before i2c_bit_add_bus. See https://bugs.freedesktop.org/show_bug.cgi?id=68456 Reported-by: Hans-Peter Deifel <hpdeifel@gmx.de> Tested-by: Hans-Peter Deifel <hpdeifel@gmx.de> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/therm: survive to suspend/resume cyclesMartin Peres2013-09-044-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Therm uses 3 ptimer alarms. Two to drive the fan and one for polling the temperature. When suspending/resuming, alarms will never be fired. As we are checking if there isn't an alarm pending before rescheduling another one, we end up never checking temperature or updating the fan speed. This commit also adds debug messages to be able to spot more easily if this case happens again in the future. Sorry for the spam if you activate the debug level though. Tested-by: Dash Four <mr.dash.four@googlemail.com> v2: - fix temperature polling too Signed-off-by: Martin Peres <martin.peres@labri.fr> Tested-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/timer: add a way to cancel alarmsMartin Peres2013-09-043-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | Since alarms don't play well with suspend, it is important every alarm user cancels his tasks before suspending. The task should be rescheduled on resume. Signed-off-by: Martin Peres <martin.peres@labri.fr> Tested-by: Martin Peres <martin.peres@labri.fr> Tested-by: Dash Four <mr.dash.four@googlemail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/timer: restore the time on resumeMartin Peres2013-09-041-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be useful if some parts of Nouveau try to calculate the time between two events. Without this patch, the time difference would be negative in the case where the computer is suspended/resumed between two events. This patch should fix fan speed probing when done while suspending/resuming. Solve this by saving the current time before suspending and by restoring it on resume. Signed-off-by: Martin Peres <martin.peres@labri.fr> Tested-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/fan: restore pwm value on resume when in manual/auto modeMartin Peres2013-09-042-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | If the fan was in manual or auto mode, we should restore the fan speed that was previously set when resuming. The initial pwm value is saved when loading the module. Signed-off-by: Martin Peres <martin.peres@labri.fr> Tested-by: Martin Peres <martin.peres@labri.fr> Tested-by: Dash Four <mr.dash.four@googlemail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/therm: Set the correct pwm_mode upon resumeEmil Velikov2013-09-041-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Martin Peres <martin.peres@labri.fr> Tested-by: Martin Peres <martin.peres@labri.fr> Tested-by: Dash Four <mr.dash.four@googlemail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: require contiguous bo for framebufferMaarten Lankhorst2013-09-041-0/+5
| | | | | | | | | | | | | | | | This was already required before, but no check in the kernel was done to enforce it. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv50-/disp: use the number of dac, sor, pior rather than hardcoded valuesEmil Velikov2013-09-041-17/+17
| | | | | | | | | | | | | | | | | | The values are already stored on chipset specific basis in the ctor. Make the most of them and simplify the code further by using a temporary variable to avoid code duplication. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: remove duplicate copy of nv44_graph_classIlia Mirkin2013-09-042-8/+5Star
| | | | | | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/vdec: implement support for VP3 enginesIlia Mirkin2013-09-046-53/+104
| | | | | | | | | | | | | | | | | | For NV98+, BSP/VP/PPP are all FUC-based engines. Hook them all up in the same way as NVC0, but with a couple of different values. Also make sure that the PPP engine is handled in the fifo/mc/vm. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/core: get rid of math.h, replace log2i with order_base_2Ilia Mirkin2013-09-047-27/+7Star
| | | | | | | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/radeon: support render nodesChristian König2013-09-022-12/+12
| | | | | | | | | | | | | | | | | | Enable support for drm render nodes for radeon by flagging the ioctls that are safe and just needed for rendering. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/nouveau: Support render nodesMartin Peres2013-09-021-12/+12
| | | | | | | | | | | | | | | | | | | | | | Enable support for drm render nodes for nouveau by flagging the ioctls that are safe and just needed for rendering. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/i915: Support render nodesKristian Høgsberg2013-09-022-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | Enable support for drm render nodes for i915 by flagging the ioctls that are safe and just needed for rendering. v2: mark reg_read, set_caching and get_caching (ickle, danvet) Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: fix DRM_IOCTL_MODE_GETFB handle-leakDavid Herrmann2013-09-021-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DRM_IOCTL_MODE_GETFB is used to retrieve information about a given framebuffer ID. It is a read-only helper and was thus declassified for unprivileged access in: commit a14b1b42477c5ef089fcda88cbaae50d979eb8f9 Author: Mandeep Singh Baines <mandeep.baines@gmail.com> Date: Fri Jan 20 12:11:16 2012 -0800 drm: remove master fd restriction on mode setting getters However, alongside width, height and stride information, DRM_IOCTL_MODE_GETFB also passes back a handle to the underlying buffer of the framebuffer. This handle allows users to mmap() it and read or write into it. Obviously, this should be restricted to DRM-Master. With the current setup, *any* process with access to /dev/dri/card0 (which means any process with access to hardware-accelerated rendering) can access the current screen framebuffer and modify it ad libitum. For backwards-compatibility reasons we want to keep the DRM_IOCTL_MODE_GETFB call unprivileged. Besides, it provides quite useful information regarding screen setup. So we simply test whether the caller is the current DRM-Master and if not, we return 0 as handle, which is always invalid. A following DRM_IOCTL_GEM_CLOSE on this handle will fail with EINVAL, but we accept this. Users shouldn't test for errors during GEM_CLOSE, anyway. And it is still better as a failing MODE_GETFB call. v2: add capable(CAP_SYS_ADMIN) check for compatibility with i-g-t Cc: <stable@vger.kernel.org> Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/msm: convert to drm_bridgeRob Clark2013-09-0210-260/+274
| | | | | | | | | | | | | | | | | | | | Drop the msm_connector base class, and special calls to base class methods from the encoder, and use instead drm_bridge. This allows for a cleaner division between the hdmi (and in future dsi) blocks, from the mdp block. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Add drm_bridgeSean Paul2013-09-022-19/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the notion of a drm_bridge. A bridge is a chained device which hangs off an encoder. The drm driver using the bridge should provide the association between encoder and bridge. Once a bridge is associated with an encoder, it will participate in mode set, and dpms (via the enable/disable hooks). Signed-off-by: Sean Paul <seanpaul@chromium.org> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/nouveau: fix up 32-bit ioctls and device wake up.Dave Airlie2013-09-022-1/+2
| | | | | | | | | | | | Noticed by kbuild test robot. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * Merge branch 'drm-next-3.12' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2013-09-02142-6657/+20937
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-next Alex writes: This is the radeon drm-next request. Big changes include: - support for dpm on CIK parts - support for ASPM on CIK parts - support for berlin GPUs - major ring handling cleanup - remove the old 3D blit code for bo moves in favor of CP DMA or sDMA - lots of bug fixes [airlied: fix up a bunch of conflicts from drm_order removal] * 'drm-next-3.12' of git://people.freedesktop.org/~agd5f/linux: (898 commits) drm/radeon/dpm: make sure dc performance level limits are valid (CI) drm/radeon/dpm: make sure dc performance level limits are valid (BTC-SI) (v2) drm/radeon: gcc fixes for extended dpm tables drm/radeon: gcc fixes for kb/kv dpm drm/radeon: gcc fixes for ci dpm drm/radeon: gcc fixes for si dpm drm/radeon: gcc fixes for ni dpm drm/radeon: gcc fixes for trinity dpm drm/radeon: gcc fixes for sumo dpm drm/radeonn: gcc fixes for rv7xx/eg/btc dpm drm/radeon: gcc fixes for rv6xx dpm drm/radeon: gcc fixes for radeon_atombios.c drm/radeon: enable UVD interrupts on CIK drm/radeon: fix init ordering for r600+ drm/radeon/dpm: only need to reprogram uvd if uvd pg is enabled drm/radeon: check the return value of uvd_v1_0_start in uvd_v1_0_init drm/radeon: split out radeon_uvd_resume from uvd_v4_2_resume radeon kms: fix uninitialised hotplug work usage in r100_irq_process() drm/radeon/audio: set up the sads on DCE3.2 asics drm/radeon: fix handling of variable sized arrays for router objects ... Conflicts: drivers/gpu/drm/i915/i915_dma.c drivers/gpu/drm/i915/i915_gem_dmabuf.c drivers/gpu/drm/i915/intel_pm.c drivers/gpu/drm/radeon/cik.c drivers/gpu/drm/radeon/ni.c drivers/gpu/drm/radeon/r600.c
| | * drm/radeon/dpm: make sure dc performance level limits are valid (CI)Alex Deucher2013-08-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check to make sure the dc limits are valid before using them. Some systems may not have a dc limits table. In that case just use the ac limits. This fixes hangs on systems when the power state is changed when on battery (dc) due to invalid performance state parameters. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=68708 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| | * drm/radeon/dpm: make sure dc performance level limits are valid (BTC-SI) (v2)Alex Deucher2013-08-303-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check to make sure the dc limits are valid before using them. Some systems may not have a dc limits table. In that case just use the ac limits. This fixes hangs on systems when the power state is changed when on battery (dc) due to invalid performance state parameters. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=68708 v2: fix up limits in dpm_init() Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org