summaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2013-04-26drm/edid: Check both 60Hz and 59.94Hz when looking for a CEA modeVille Syrjälä1-3/+24
drm_match_cea_mode() should be able to match both the 60Hz version, and the 59.94Hz version of modes. We only store one pixel clock value per mode in edid_cea_modes, so the other value must be calculated. Depending on the mode, edid_cea_modes contains the pixel clock for either the 60Hz version or the 59.94Hz version, so a bit of care is needed so that the calculation produces the correct result. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46800 Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-26drm/edid: Populate vrefresh for CEA modesVille Syrjälä1-64/+129
Well have use for the vrefresh information of CEA modes later. Just populate the information into the table to avoid having to calculate it. I'm too lazy to check if someone relies on newly allocated CEA modes having 0 vrefresh, so just clear vrefresh back to 0 when adding the mode to the connector's modelist. Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-26drm: Add drm_mode_equal_no_clocks()Ville Syrjälä1-1/+21
drm_mode_equal_no_clocks() is like drm_mode_equal() except it doesn't compare the clock or vrefresh values. drm_mode_equal() is now implemented by first doing the clock checks, and then calling drm_mode_equal_no_clocks(). v2: Add missing EXPORT_SYMBOL() Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-26drm/shmobile: Fix race condition between page flip request and handlerLaurent Pinchart1-1/+1
The page flip handler stores the page flip event pointer and then calls drm_vblank_get() to enable the vblank interrupt. Due to the vblank off delay, the vblank interrupt can be enabled in the hardware at that point, even if the vblank reference count is equal to 0. If a vblank interrupt is triggered between storing the event pointer and calling drm_vblank_get(), the page flip completion handler will process the event and call drm_vblank_put() with a reference count equal to 0. This will result in a BUG_ON. Fix the race condition by calling drm_vblank_get() before storing the event pointer. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-26drm: export drm_vm_open_lockedArnd Bergmann1-0/+1
The EXYNOS DRM driver uses drm_vm_open_locked in its mmap() function, and it can be built as a loadable module, which currently fails. This exports the symbol from the DRM core to avoid ERROR: "drm_vm_open_locked" [drivers/gpu/drm/exynos/exynosdrm.ko] undefined! Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Inki Dae <inki.dae@samsung.com> Cc: Joonyoung Shim <jy0922.shim@samsung.com> Cc: Seung-Woo Kim <sw0312.kim@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-26drm/tilcdc: use only a single module device tableArnd Bergmann3-3/+0
The tilcdc driver fails to be built as a module because of extraneous MODULE_DEVICE_TABLE entries: drivers/gpu/drm/tilcdc/tilcdc_slave.o:(.data+0x54): multiple definition of `__mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here drivers/gpu/drm/tilcdc/tilcdc_panel.o:(.data+0x54): multiple definition of `__mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here drivers/gpu/drm/tilcdc/tilcdc_drv.o:(.data+0x184): multiple definition of `__mod_of_device_table' drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here Since the entire point of these entries is to make the module autoload when one of the devices is present, it's enough to keep the one entry for "ti,am33xx-tilcdc", which should always be there if any of the others are. Acked-by: Rob Clark <robdclark@gmail.com> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-26Merge branch 'gma500-fixes' of git://github.com/patjak/drm-gma500 into drm-nextDave Airlie2-3/+3
Two fixes for gma500. First one from Anisse allows us to handle ASLE irqs even when BIOS doesn't trigger a pipe event irq. The second one allows dual head setups to have a big shared framebuffer. * 'gma500-fixes' of git://github.com/patjak/drm-gma500: drm/gma500: Increase max resolution for mode setting drm/gma500: fix backlight hotkeys behaviour on netbooks
2013-04-25drm/gma500: Increase max resolution for mode settingPatrik Jakobsson1-2/+2
By having a higher max resolution we can now set up a virtual framebuffer that spans several monitors. 4096 should be ok since we're gen 3 or higher and should be enough for most dual head setups. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-04-25drm/gma500: fix backlight hotkeys behaviour on netbooksAnisse Astier1-1/+1
Backlight hotkeys weren't working before on certain cedartrail laptops. The source of this problem is that the hotkeys' ASLE opregion interrupts were simply ignored. Driver seemed to expect the interrupt to be associated with a pipe, but it wasn't. Accepting the ASLE interrupt without an associated pipe event flag fixes the issue, the backlight code is called when needed, making the brightness keys work properly. [patrik: This patch affects irq handling on any netbook with opregion support] Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=833597 Reference: http://lists.freedesktop.org/archives/dri-devel/2012-July/025279.html Cc: stable@kernel.org Signed-off-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-04-24drm/tilcdc: Fix checkpatch error in tilcdc_panel.cSachin Kamat1-1/+1
Fixes the following checkpatch error: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-24drm/tilcdc: Remove space before tabSachin Kamat1-1/+1
Silences the following checkpatch warning: WARNING: please, no space before tabs Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-24drm/tilcdc: Remove unnecessary bracesSachin Kamat1-3/+2
Silences the following checkpatch warning: WARNING: braces {} are not necessary for any arm of this statement if (priv->rev == 1) { Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-24drivers/gpu/drm/tilcdc: Makefile, only -Werror when no -W* in EXTRA_CFLAGSChen Gang1-1/+4
When make with EXTRA_CFLAGS=-W, it will report error. so give a check in Makefile. Signed-off-by: Chen Gang <gang.chen@asianux.com> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Acked-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-24drm/tilcdc: Fix an incorrect conditionSachin Kamat1-1/+1
Instead of checking if num_encoders is zero, it is being assigned 0. Convert the assignment to a check. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-23drm/radeon: disable UVD advanced semaphore modeChristian König1-1/+1
Not needed and seems to cause some problems. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon: fix endian bugs in radeon_atom_get_clock_dividers() (v3)Alex Deucher2-4/+4
v2: fix copy paste typo. v3: clarify new union member Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon: fix up audio dto programming for DCE2Alex Deucher2-4/+18
Uses a different register than DCE3 asics. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon/evergreen: set SAD registersRafał Miłecki1-0/+63
This allows audio (alsa) driver to read them and have a clue about audio capabilities of connected receiver. This has been verified to be compatible with fglrx behaviour for Onkyo TX-SR605 and Denon 1912. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm: add drm_edid_to_eld helper extracting SADs from EDID (v2)Rafał Miłecki1-0/+59
Some devices (ATI/AMD cards) don't support passing ELD struct to the hardware but just require filling specific registers and then the hardware/firmware does the rest. In such cases we need to read the info from SAD blocks and put them in the correct registers. agd5f: note that the returned pointer needs to be kfreed as per Christian's suggestion. v2: fix warning Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon/si: add support for golden register initAlex Deucher1-0/+793
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon/cayman,TN: add support for golden register init (v2)Alex Deucher1-0/+281
v2: add richland support Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon/evergreen: add support for golden register initAlex Deucher1-0/+863
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon/7xx: add support for golden register initAlex Deucher1-0/+652
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon: add helper function to support golden registersAlex Deucher2-0/+39
Golden registers are arrays of register settings from the hw team that need to be initialized at asic startup. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon: fix typo in si_select_se_sh()Alex Deucher1-1/+1
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2013-04-23drm/radeon: switch audio handling to use callbacksAlex Deucher6-88/+87
Register audio callbacks for asic where we support audio. Cleans up the code and makes it easier to add support for newer asics. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon: clean up audio dto programmingAlex Deucher4-62/+50
Split into DCE2/3 and DCE4/5 variants. Still todo is to calculate the DTO dividers properly. Add proper formula to the comments. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon: clean up audio supported checkAlex Deucher1-4/+1
Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon: raise UVD clocks on init v3Christian König1-8/+24
v2: not only raise the clocks on VCPU boot, but also on IB test. v3: agd5f: fix r600_uvd_init return value. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=63730 Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-23drm/radeon: raise UVD clocks only on demandChristian König3-2/+34
That not only saves some power, but also solves problems with older chips where an idle UVD block on higher clocks can cause problems. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-22drm/radeon: put UVD PLLs in bypass modeChristian König3-23/+41
Just power down the PLL when we get a VCLK or DCLK of zero. Enabling the bypass mode early should also allow us to switch UVD clocks on the fly. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-22drm/radeon: disable audio format interrupts on EvergreenAlex Deucher1-1/+3
The audio format change interrupts are an aid in debugging, but not required for operation. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-22drm/radeon: fix hdmi mode enable on RS600/RS690/RS740Alex Deucher1-2/+2
These chips were previously skipped since they are pre-R600. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2013-04-22drm/radeon/evergreen: write default channel numbersRafał Miłecki1-0/+21
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-22drm/radeon/evergreen: reorder HDMI setupRafał Miłecki1-12/+15
Driver fglrx setups audio and ACR packets after basic initialization, which sounds sane, do the same. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-22drm/radeon/evergreen: setup HDMI before enabling itRafał Miłecki2-4/+12
Closed source driver fglrx seems to enable infoframes and audio packets at the end, which makes sense, do the same. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-22drm/radeon: add helpers for masking and setting bits in regsRafał Miłecki2-10/+8
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-22drm/radeon: fix alignment of UVD fenceChristian König2-5/+4
Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-22drm/radeon: cleanup UVD address checksChristian König1-12/+14
Message and feedback buffers must be at start of VRAM, not at start of address space. Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-04-22drm/radeon: disable the crtcs in mc_stop (evergreen+) (v2)Alex Deucher1-0/+12
Just disabling the mem requests should be enough, but that doesn't seem to work correctly on efi systems. May fix: https://bugs.freedesktop.org/show_bug.cgi?id=57567 https://bugs.freedesktop.org/show_bug.cgi?id=43655 https://bugzilla.kernel.org/show_bug.cgi?id=56441 v2: blank displays first, then disable. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2013-04-22drm/radeon: disable the crtcs in mc_stop (r5xx-r7xx) (v2)Alex Deucher2-0/+12
Just disabling the mem requests should be enough, but that doesn't seem to work correctly on efi systems. v2: blank displays first, then disable. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2013-04-22drm/radeon: properly lock disp in mc_stop/resume for evergreen+Alex Deucher2-4/+45
Need to wait for the new addresses to take affect before re-enabling the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2013-04-22drm/radeon: properly lock disp in mc_stop/resume for r5xx-r7xxAlex Deucher2-0/+44
Need to wait for the new addresses to take affect before re-enabling the MC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2013-04-22drm/radeon: update wait_for_vblank for evergreen+Alex Deucher1-8/+36
Properly wait for the next vblank region. The previous code didn't always wait long enough depending on the timing. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2013-04-22drm/radeon: update wait_for_vblank for r5xx-r7xxAlex Deucher1-8/+44
Properly wait for the next vblank region. The previous code didn't always wait long enough depending on the timing. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2013-04-22drm/radeon: update wait_for_vblank for r1xx-r4xxAlex Deucher1-24/+53
Properly wait for the next vblank region. The previous code didn't always wait long enough depending on the timing. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
2013-04-22Merge tag 'drm/tegra/for-3.10' of git://anongit.freedesktop.org/tegra/linux ↵Dave Airlie51-644/+7148
into drm-next drm/tegra: Changes for v3.10-rc1 The bulk of this pull-request is the host1x series that has been in the works for a few months. The current implementation looks good and has been tested by several independent parties. So far no issues have been found. To be on the safe side, the new Tegra-specific DRM IOCTLs depend on staging in order to give some amount of flexibility to change them just in case. The plan is to remove that dependency once more userspace exists to verify the adequacy of the IOCTLs. Currently only the 2D engine is supported, but patches are in the works to enable 3D support on top of this framework as well. Various bits of open-source userspace exist to test the 2D and 3D support[0]. This is still a bit immature but it allows to verify that the kernel interfaces work properly. To round things off there are two smaller cleanup patches, one of them adding a new pixel format and the other removing a redundent Kconfig dependency. [0]: https://github.com/grate-driver * tag 'drm/tegra/for-3.10' of git://anongit.freedesktop.org/tegra/linux: drm/tegra: don't depend on OF drm/tegra: Support the XBGR8888 pixelformat drm/tegra: Add gr2d device gpu: host1x: drm: Add memory manager and fb gpu: host1x: Remove second host1x driver gpu: host1x: drm: Rename host1x to host1x_drm drm/tegra: Move drm to live under host1x gpu: host1x: Add debug support gpu: host1x: Add channel support gpu: host1x: Add syncpoint wait and interrupts gpu: host1x: Add host1x driver
2013-04-22drm/tegra: don't depend on OFStephen Warren1-1/+1
ARCH_TEGRA always enabled OF, so there's no need for any driver to depend on it. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
2013-04-22drm/tegra: Support the XBGR8888 pixelformatThierry Reding1-0/+5
While at it, also include the RGB565 pixelformat in the list of formats supported by overlays. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Erik Faye-Lund <kusmabite@gmail.com>
2013-04-22drm/tegra: Add gr2d deviceTerje Bergstrom7-3/+595
Add client driver for 2D device, and IOCTLs to pass work to host1x channel for 2D. Also adds functions that can be called to access sync points from DRM. Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Thierry Reding <thierry.reding@avionic-design.de> Tested-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>