summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm/panel: update EDID BLOB in panel_simple_get_modes()Stephen Warren2014-01-141-0/+1
| | | | | | | | | This stashes away the EDID data so that the sysfs per-connector file "edid" can display it. Without this change, the "edid" file is always empty. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Remove unnecessary includeThierry Reding2014-01-141-1/+0
| | | | | | | Nothing from the asm/mach/irq.h header is needed in this file, so there is no need to include it. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Use proper data typeThierry Reding2014-01-141-2/+1
| | | | | | | The last argument to of_get_property() is a pointer to an int, rather than size_t. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Clarify how panel modes override othersThierry Reding2014-01-141-0/+4
| | | | | | | | | | When a panel advertises one or more modes, they are used exclusively. Other methods for obtaining the mode, such as DDC as used for HDMI or binary EDID blobs embedded in the DT, are ignored. The panel drivers should be providing this functionality if they want to expose it as well. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Fix possible CRTC mask for RGB outputsThierry Reding2014-01-141-1/+1
| | | | | | | | | | The mask of possible CRTCs that an output (DRM encoder) can be attached to is relative to the position within the DRM device's list of CRTCs. Deferred probing can cause this to not match the pipe number associated with a CRTC. Use the newly introduced drm_crtc_mask() to compute the mask by looking up the proper index of the given CRTC in the list. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/i915: Use drm_encoder_crtc_ok()Thierry Reding2014-01-141-24/+2
| | | | | | | | | | The intel_encoder_crtc_ok() is a duplicate of the drm_encoder_crtc_ok() function that used to be only available in the DRM CRTC helpers. It has recently been moved to the core, so the duplicate can now be dropped. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm: Move drm_encoder_crtc_ok() to coreThierry Reding2014-01-142-13/+13
| | | | | | | | Using the new drm_crtc_mask() function, drm_encoder_crtc_ok() can now be written in a significantly shorter way, so it can be moved to a header file and be made static inline. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm: provide a helper for the encoder possible_crtcs maskRussell King2014-01-143-17/+37
| | | | | | | | | | | | | | | The encoder possible_crtcs mask identifies which CRTCs can be bound to a particular encoder. Each bit from bit 0 defines an index in the list of CRTCs held in the DRM mode_config crtc_list. Rather than having drivers trying to track the position of their CRTCs in the list, expose the code which already exists for calculating the appropriate mask bit for a CRTC. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> [treding@nvidia.com: add drm_crtc_index(), move to core] Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Don't check resource with devm_ioremap_resource()Wolfram Sang2014-01-141-3/+0
| | | | | | | | | devm_ioremap_resource() does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/panel: Add support for Chunghwa CLAA101WA01A panelStephen Warren2014-01-082-0/+32
| | | | | | | | The Chunghwa CLAA101WA01A is a 10.1" 1366x768 panel, which can be supported by the simple panel driver. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/panel: Add support for Samsung LTN101NT05 panelMarc Dietrich2014-01-082-0/+32
| | | | | | | | | | | The Samsung LNT101NT05 10.1" WXVGA panel can be supported by the simple panel driver. Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: David Airlie <airlied@linux.ie> Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: fix compile w/ CONFIG_DYNAMIC_DEBUGStephen Warren2013-12-201-0/+1
| | | | | | | | | | | | | | With CONFIG_DYNAMIC_DEBUG=y, the following compile error occurs: drivers/gpu/drm/tegra/mipi-phy.c: In function ‘mipi_dphy_timing_validate’: drivers/gpu/drm/tegra/mipi-phy.c:69:11: error: ‘EINVAL’ undeclared (first use in this function) drivers/gpu/drm/tegra/mipi-phy.c:69:11: note: each undeclared identifier is reported only once for each function it appears in Fix this by directly including the header that defines EINVAL. Fixes: dec727399a4b ("drm/tegra: Add DSI support") Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Add PRIME supportThierry Reding2013-12-203-2/+193
| | | | | | | | Implement very basic PRIME support. This currently only works with buffers that are contiguous in memory and will refuse to import any physically non-contiguous buffers. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Relocate some output-specific codeThierry Reding2013-12-205-35/+97
| | | | | | | | Some of the code in the CRTC's mode setting code is specific to the RGB output or needs to be called slightly differently depending on the type of output. Push that code down into the output drivers. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Add Tegra124 DC supportThierry Reding2013-12-204-6/+53
| | | | | | | | Tegra124 and later support interlacing, but the driver doesn't support it yet. Make sure interlacing stays disabled on hardware that supports it. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Fix small leak on error in tegra_fb_alloc()Dan Carpenter2013-12-201-1/+3
| | | | | | | If we don't have enough memory for ->planes then we leak "fb". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Make legacy fbdev support optionalThierry Reding2013-12-204-20/+45
| | | | | | | | | | | A lot of the modern userspace is capable of working without the legacy fbdev support. kmscon can be used as a replacement for the framebuffer console, and KMS X drivers create their own framebuffers. Most people don't have a system where all of this works yet, though, so leave support enabled by default. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Sort reverse-dependencies alphabeticallyThierry Reding2013-12-201-2/+2
| | | | | | | Move the TEGRA_HOST1X and DRM_KMS_HELPER entries around to keep the list sorted. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Fix return value checkWei Yongjun2013-12-201-2/+2
| | | | | | | | | In case of error, the devm_ioremap_resource() function returns ERR_PTR() and never NULL. The NULL test in the return value check should therefore be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Add DSI supportThierry Reding2013-12-2011-1/+1330
| | | | | | | | | | | This commit adds support for both DSI outputs found on Tegra. Only very minimal functionality is implemented, so advanced features like ganged mode won't work. Due to the lack of other test hardware, some sections of the driver are hardcoded to work with Dalmore. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Disable outputs for power-savingThierry Reding2013-12-191-5/+6
| | | | | | | | | | | | | When an output is disabled, its DPMS mode is usually set to off. Instead of only disabling the panel (if one is attached), turn the output off entirely to save more power. HDMI doesn't have any panels attached, so it previously didn't save any power at all. With this commit, however, the complete HDMI interface will be turned off, therefore allowing an attached monitor to go into a standby mode. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Track HDMI enable stateThierry Reding2013-12-191-0/+11
| | | | | | | | | The DRM core doesn't track enable and disable state of encoders and/or connectors, so calls to the output's .enable() and .disable() are not guaranteed to be balanced. Track the enable state internally so that calls to regulator and clock frameworks remain balanced. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Fix HDMI audio frequency typoThierry Reding2013-12-191-1/+1
| | | | | | The correct check is for 48 kHz, not 480 kHz. Found by Coverity. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Do not export tegra_bo_opsThierry Reding2013-12-192-3/+1
| | | | | | | These buffer object operations are never used outside of the GEM implementation so there is no use in exporting them. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Remove spurious blank lineThierry Reding2013-12-191-1/+0
| | | | Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Increase compile test coverageThierry Reding2013-12-191-1/+1
| | | | | | | | | | The ARCH_MULTIPLATFORM dependency was introduced back when Tegra didn't support multiplatform yet as a means to allow the driver to be easily compile-tested along with other DRM drivers. In the meantime, the new COMPILE_TEST Kconfig option has been introduced for exactly that purpose, so use that instead to clarify the intention. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Allow the driver to be built as a moduleThierry Reding2013-12-191-1/+1
| | | | | | | All APIs that the driver uses are exported, so the driver can now be built as a module. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Add Tegra124 supportThierry Reding2013-12-198-1/+768
| | | | | | | | Tegra124 has 192 syncpoints whereas its predecessors had 32 syncpoints. This required changes to the hardware register layout. Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: clk_round_rate() can return a zero upon errorPaul Walmsley2013-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | Treat both negative and zero return values from clk_round_rate() as errors. This is needed since subsequent patches will convert clk_round_rate()'s return value to be an unsigned type, rather than a signed type, since some clock sources can generate rates higher than (2^31)-1 Hz. Eventually, when calling clk_round_rate(), only a return value of zero will be considered a error. All other values will be considered valid rates. The comparison against values less than 0 is kept to preserve the correct behavior in the meantime. Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com> Cc: Mikko Perttunen <mperttunen@nvidia.com> Cc: Arto Merilainen <amerilainen@nvidia.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Terje Bergström <tbergstrom@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Fix build warningsThierry Reding2013-12-191-5/+8
| | | | | | | | | | | When debugfs support isn't enabled, gcc complains about some variables being unused. To avoid further #ifdefery, move debugfs specific setup code into static functions and use IS_ENABLED(CONFIG_DEBUG_FS) to have the compiler, rather than the preprocessor, discard them when unused. The advantage of doing it this way is that all the code will be compile-tested whether or not debugfs support is enabled. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Increase compile test coverageThierry Reding2013-12-191-1/+1
| | | | | | | | | | The ARCH_MULTIPLATFORM dependency was introduced back when Tegra didn't support multiplatform yet as a means to allow the driver to be easily compile-tested along with other DRM drivers. In the meantime, the new COMPILE_TEST Kconfig option has been introduced for exactly that purpose, so use that instead to clarify the intention. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Fix more sparse warningsThierry Reding2013-12-191-0/+3
| | | | | | | | Include the linux/host1x.h and dev.h headers so that function prototypes are visible to keep sparse from suggesting that their implementations be made static. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Use the correct HW headers for host1x02Thierry Reding2013-12-193-2/+150
| | | | | | | An earlier patch added a subset of the required HW specific header files but didn't actually include the right ones when compiling for host1x02. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Export public APIThierry Reding2013-12-194-0/+22
| | | | | | | Make the public API symbols visible so that depending drivers can be built as a module. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Add MIPI pad calibration supportThierry Reding2013-12-195-4/+294
| | | | | | | This driver adds support to perform calibration of the MIPI pads for CSI and DSI. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Add MIPI pad calibration DT bindingsThierry Reding2013-12-171-0/+41
| | | | | | | | Introduce device tree bindings for the MIPI pad calibration controller found on Tegra SoCs. The controller can be used to perform calibration of pads used for DSI and CSI peripherals. Signed-off-by: Thierry Reding <treding@nvidia.com>
* gpu: host1x: Update host1x device tree exampleThierry Reding2013-12-171-2/+2
| | | | | | | The display controller primary clock was recently renamed to "dc", so update the example to reflect that. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/tegra: Implement panel supportThierry Reding2013-12-174-4/+38
| | | | | | | | | Use the DRM panel framework to attach a panel to an output. If the panel attached to a connector supports supports the backlight brightness accessors, a property will be available to allow the brightness to be modified from userspace. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/panel: Add support for Panasonic VVX10F004B0Thierry Reding2013-12-171-7/+87
| | | | | | | The Panasonic VVX10F004B0 is a 10.1" WUXGA TFT LCD panel connected using four DSI lanes. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm/panel: Add simple panel supportThierry Reding2013-12-174-0/+433
| | | | | | | | | | | | | Add a driver for simple panels. Such panels can have a regulator that provides the supply voltage and a separate GPIO to enable the panel. Optionally the panels can have a backlight associated with them so it can be enabled or disabled according to the panel's power management mode. Support is added for two panels: An AU Optronics 10.1" WSVGA and a Chunghwa Picture Tubes 10.1" WXGA panel. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm: Add panel supportThierry Reding2013-12-175-0/+190
| | | | | | | | | | | | | | | | | | | | | Add a very simple framework to register and lookup panels. Panel drivers can initialize a DRM panel and register it with the framework, allowing them to be retrieved and used by display drivers. Currently only support for DPMS and obtaining panel modes is provided. However it should be sufficient to enable a large number of panels. The framework should also be easily extensible to support more sophisticated kinds of panels such as DSI. The framework hasn't been tied into the DRM core, even though it should be easily possible to do so if that's what we want. In the current implementation, display drivers can simple make use of it to retrieve a panel, obtain its modes and control its DPMS mode. Note that this is currently only tested on systems that boot from a device tree. No glue code has been written yet for systems that use platform data, but it should be easy to add. Signed-off-by: Thierry Reding <treding@nvidia.com>
* drm: Add MIPI DSI bus supportAndrzej Hajda2013-12-174-0/+478
| | | | | | | | | | | | | | | MIPI DSI bus allows to model DSI hosts and DSI peripherals using the Linux driver model. DSI hosts are registered by the DSI host drivers. During registration DSI peripherals will be created from the children of the DSI host's device tree node. Support for registration from board-setup code will be added later when needed. DSI hosts expose operations which can be used by DSI peripheral drivers to access associated devices. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* of: Add simple panel device tree bindingThierry Reding2013-12-174-0/+42
| | | | | | | | | | | This binding specifies a set of common properties for display panels. It can be used as a basis by bindings for specific panels. Bindings for three specific panels are provided to show how the simple panel binding can be used. Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* of: Add MIPI DSI bus device tree bindingsThierry Reding2013-12-171-0/+98
| | | | | | | | Document the device tree bindings for the MIPI DSI bus. The MIPI Display Serial Interface specifies a serial bus and a protocol for communication between a host and up to four peripherals. Signed-off-by: Thierry Reding <treding@nvidia.com>
* Merge tag 'tegra-for-3.14-powergate' into drm/for-nextThierry Reding2013-12-172-3/+240
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM: tegra: powergate driver changes This branch includes all the changes to Tegra's powergate driver for 3.14. These are separate out, since the Tegra DRM changes for 3.14 rely on the new APIs introduced here. A few cleanups and fixes are included, plus additions of Tegra124 SoC support, and a new API for manipulating Tegra's IO rail deep power down states. This branch is based on tag tegra-for-3.14-dmas-resets-rework, in order to avoid conflicts with the addition of common reset controller support to the powergate driver.
| * ARM: tegra: Add IO rail supportThierry Reding2013-12-162-0/+177
| | | | | | | | | | | | | | | | Add tegra_io_rail_power_off() and tegra_io_rail_power_on() functions to put IO rails into or out of deep powerdown mode, respectively. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
| * ARM: tegra: Special-case the 3D clamps on Tegra124Thierry Reding2013-12-161-0/+13
| | | | | | | | | | | | | | | | | | A separate register is used to remove the clamps for the GPU on Tegra124. In order to be able to use the same API, special-case this particular partition. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
| * ARM: tegra: Add Tegra124 powergate supportThierry Reding2013-12-162-0/+45
| | | | | | | | | | | | | | | | | | Three new gates have been added for Tegra124: SOR, VIC and IRAM. In addition, PCIe and SATA gates are again supported, like on Tegra20 and Tegra30. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
| * ARM: tegra: Export tegra_powergate_remove_clamping()Thierry Reding2013-12-161-0/+1
| | | | | | | | | | | | | | | | | | Drivers can use the tegra_powergate_remove_clamping() API during initialization. In order to allow such drivers to be built as modules, export the symbol. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
| * ARM: tegra: Export tegra_powergate_power_off()Thierry Reding2013-12-161-0/+1
| | | | | | | | | | | | | | | | This function can be used by drivers, which in turn may be built as modules. Export the symbol so it is available to modules. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
OpenPOWER on IntegriCloud