- 19 Dec, 2013 6 commits
-
-
Thierry Reding authored
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>
-
Thierry Reding authored
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>
-
Thierry Reding authored
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>
-
Thierry Reding authored
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>
-
Thierry Reding authored
Make the public API symbols visible so that depending drivers can be built as a module. Signed-off-by:
Thierry Reding <treding@nvidia.com>
-
Thierry Reding authored
This driver adds support to perform calibration of the MIPI pads for CSI and DSI. Signed-off-by:
Thierry Reding <treding@nvidia.com>
-
- 17 Dec, 2013 5 commits
-
-
Thierry Reding authored
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>
-
Thierry Reding authored
The Panasonic VVX10F004B0 is a 10.1" WUXGA TFT LCD panel connected using four DSI lanes. Signed-off-by:
Thierry Reding <treding@nvidia.com>
-
Thierry Reding authored
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>
-
Thierry Reding authored
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>
-
Andrzej Hajda authored
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>
-
- 15 Dec, 2013 1 commit
-
-
Sergey Senozhatsky authored
Since commit ec39f64b ("drm/radeon/dpm: Convert to use devm_hwmon_register_with_groups") radeon_hwmon_init() is using hwmon_device_register_with_groups(), which sets `rdev' as a device private driver_data, while hwmon_attributes_visible() and radeon_hwmon_show_temp_thresh() are still waiting for `drm_device'. Fix them by using dev_get_drvdata(), in order to avoid this oops: BUG: unable to handle kernel paging request at 0000000000001e28 IP: [<ffffffffa02ae8b4>] hwmon_attributes_visible+0x18/0x3d [radeon] PGD 15057e067 PUD 151a8e067 PMD 0 Oops: 0000 [#1] PREEMPT SMP Call Trace: internal_create_group+0x114/0x1d9 sysfs_create_group+0xe/0x10 sysfs_create_groups+0x22/0x5f device_add+0x34f/0x501 device_register+0x15/0x18 hwmon_device_register_with_groups+0xb5/0xed radeon_hwmon_init+0x56/0x7c [radeon] radeon_pm_init+0x134/0x7e5 [radeon] radeon_modeset_init+0x75f/0x8ed [radeon] radeon_driver_load_kms+0xc6/0x187 [radeon] drm_dev_register+0xf9/0x1b4 [drm] drm_get_pci_dev+0x98/0x129 [drm] radeon_pci_probe+0xa3/0xac [radeon] pci_device_probe+0x6e/0xcf driver_probe_device+0x98/0x1c4 __driver_attach+0x5c/0x7e bus_for_each_dev+0x7b/0x85 driver_attach+0x19/0x1b bus_add_driver+0x104/0x1ce driver_register+0x89/0xc5 __pci_register_driver+0x58/0x5b drm_pci_init+0x86/0xea [drm] radeon_init+0x97/0x1000 [radeon] do_one_initcall+0x7f/0x117 load_module+0x1583/0x1bb4 SyS_init_module+0xa0/0xaf Signed-off-by:
Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Alexander Deucher <Alexander.Deucher@amd.com> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 11 Dec, 2013 2 commits
-
-
Stephen Warren authored
Tegra's clock driver now provides an implementation of the common reset API (include/linux/reset.h). Use this instead of the old Tegra- specific API; that will soon be removed. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-by:
Bjorn Helgaas <bhelgaas@google.com> Acked-By:
Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by:
Thierry Reding <treding@nvidia.com> Acked-by:
Thierry Reding <treding@nvidia.com>
-
Stephen Warren authored
Tegra's clock driver now provides an implementation of the common reset API (include/linux/reset.h). Use this instead of the old Tegra- specific API; that will soon be removed. Signed-off-by:
Stephen Warren <swarren@nvidia.com> Acked-By:
Terje Bergstrom <tbergstrom@nvidia.com>
-
- 05 Dec, 2013 5 commits
-
-
Thomas Wood authored
Ensure the side-by-side (half) flag is added to any existing flags when adding modes from 3D_Structure_ALL. Signed-off-by:
Thomas Wood <thomas.wood@intel.com> Reviewed-by:
Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Thomas Wood authored
Signed-off-by:
Thomas Wood <thomas.wood@intel.com> Reviewed-by:
Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Alex Deucher authored
When probing the bus, we need to set the byte count to 0 rather than 1. v2: Don't count the first byte. bug: https://bugzilla.kernel.org/show_bug.cgi?id=66241 Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-
Alex Deucher authored
Don't crash if the encoder does not have an afmt struct. bug: https://bugs.freedesktop.org/show_bug.cgi?id=72283 Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-
Alex Deucher authored
Some boards seem to have garbage in the upper 16 bits of the vram size register. Check for this and clamp the size properly. Fixes boards reporting bogus amounts of vram. Signed-off-by:
Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-
- 04 Dec, 2013 5 commits
-
-
Rob Clark authored
5dc9e1e8 was a bit over-ambitious, and accidentially removed handling for imported prime buffers. Signed-off-by:
Rob Clark <robdclark@gmail.com> Cc: stable@vger.kernel.org Signed-off-by:
Dave Airlie <airlied@redhat.com>
-
Thomas Hellstrom authored
Some user-space apps expects to find them there. Signed-off-by:
Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by:
Jakob Bornecrantz <jakob@vmware.com>
-
Thomas Hellstrom authored
Also request kernel ttm_buffer objects for buffer objects that obviously aren't visible to user-space, and save some device address space. The accounting was broken in a couple of ways: 1) We did not differentiate between user dma buffers and kernel dma buffers. 2) The ttm_bo_acc_size function is broken in that it a) Doesn't take into account the size of the optional dma address array, b) Doesn't take into account the fact that drivers typically embed the ttm_tt structure. This needs to be fixed in ttm, but meanwhile provide a vmwgfx-specific function to do the job. Signed-off-by:
Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by:
Jakob Bornecrantz <jakob@vmware.com>
-
Thomas Hellstrom authored
Allocation was duplicating code. Comments were missing. Signed-off-by:
Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by:
Jakob Bornecrantz <jakob@vmware.com>
-
Thomas Hellstrom authored
Failure to do this would make the drm_mode_get_crtc ioctl return without crtc mode info, indicating that no mode was set. Signed-off-by:
Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by:
Jakob Bornecrantz <jakob@vmware.com>
-
- 03 Dec, 2013 16 commits
-
-
Dan Carpenter authored
We should be taking the minimum here instead of the max. It could lead to a buffer overflow. Fixes: 438d99e3 ('drm/nvd0/disp: initial crtc object implementation') Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> a/drm/nv50_display.c b/drm/nv50_display.c index f8e66c08b11a..4e384a2f99c3 100644
-
Ben Skeggs authored
Signed-off-by:
Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Signed-off-by:
Ben Skeggs <bskeggs@redhat.com>
-
Maarten Lankhorst authored
Signed-off-by:
Ben Skeggs <bskeggs@redhat.com>
-
Roy Spliet authored
Signed-off-by:
Roy Spliet <rspliet@eclipso.eu> Signed-off-by:
Ben Skeggs <bskeggs@redhat.com>
-
Roy Spliet authored
Signed-off-by:
Roy Spliet <rspliet@eclipso.eu> Signed-off-by:
Ben Skeggs <bskeggs@redhat.com>
-
Ilia Mirkin authored
Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by:
Ben Skeggs <bskeggs@redhat.com>
-
Ilia Mirkin authored
Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by:
Ben Skeggs <bskeggs@redhat.com>
-
Ilia Mirkin authored
Otherwise none of the format checks pass, since the width was still in 16.16 encoding. Signed-off-by:
Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by:
Ben Skeggs <bskeggs@redhat.com>
-
Ben Skeggs authored
Reported-by:
Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by:
Ben Skeggs <bskeggs@redhat.com>
-
Dan Carpenter authored
copy_from_user() returns the number of bytes remaining if it fails, but we want to return -EFAULT here. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Thierry Reding <treding@nvidia.com>
-
Thierry Reding authored
Include the bus.h header, so that various function declarations are visible in the source file that implements those functions. This keeps sparse from suggesting that they should be made static. Make the host1x_bus_type variable static since it isn't used globally. Finally replace the slightly unsafe dev_set_name(dev, name) by the more secure dev_set_name(dev, "%s", name). Signed-off-by:
Thierry Reding <treding@nvidia.com>
-
Thierry Reding authored
The fbdev screen memory pointer is annotated __iomem, so cast the kernel virtual address to that address space to make the warning go away. Signed-off-by:
Thierry Reding <treding@nvidia.com>
-
Thierry Reding authored
There is no need to access it from other files now that the driver has been decoupled from host1x. Signed-off-by:
Thierry Reding <treding@nvidia.com>
-
Thierry Reding authored
sparse complains because __user annotations aren't placed consistently. Signed-off-by:
Thierry Reding <treding@nvidia.com>
-
Thierry Reding authored
Previously the association to a DC was done via the encoder's .crtc field. That has the disadvantage that when an encoder is detached from its CRTC, that field is set to NULL, leading to situations where it is impossible to access the DC registers required by the RGB output. However, the coupling between DC and RGB output is really fixed on Tegra. While they can be detached logically in DRM, the RGB output can rely on the DC's existence. Signed-off-by:
Thierry Reding <treding@nvidia.com>
-