summaryrefslogtreecommitdiffstats
path: root/drivers (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * | drm/tegra: Start connectors with correct DPMS modeThierry Reding2013-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | A connector's DPMS mode isn't initialized by default, therefore using a default of 0 (DRM_MODE_DPMS_ON). This can cause problems in that the DRM core won't explicitly turn on a connector because it thinks that it is already on. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: hdmi: Enable VDD earlier for hotplug/DDCMikko Perttunen2013-10-311-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VDD regulator used to be enabled only at tegra_output_hdmi_enable, which is called after a sink is detected. However, the HDMI hotplug pin works by returning the voltage supplied by the VDD pin, so this meant that the hotplug pin was never asserted and the sink was not detected unless the VDD regulator was set to be always on. This patch moves the enable to the tegra_hdmi_init() function to make sure the regulator will get enabled and therefore ensure proper hotplug detection. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: hdmi: Fix build warningsThierry Reding2013-10-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These seem to show up when building for architectures other than ARM, which I guess will never happen. The reason why the kbuild test bot ran into these was a missing dependency which has hence been fixed. Still it doesn't hurt to fix them anyway. Reported-by: kbuild test bot <fengguang.wu@intel.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: hdmi: Detect DVI-only displaysMikko Perttunen2013-10-311-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use EDID data to determine whether the display supports HDMI or DVI only. The HDMI output used to assume to be connected to HDMI displays, but that broke support for DVI displays that don't understand the interspersed audio/other data. To be on the safe side, default to DVI if no EDID data is available. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> [treding@nvidia.com: move detection to separate function] Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Add Tegra114 HDMI supportMikko Perttunen2013-10-313-0/+250
| | | | | | | | | | | | | | | | | | | | | | | | Tegra114 TMDS configuration requires a new peak_current field and the driver current override bit has changed position. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: hdmi: Parameterize based on compatible propertyThierry Reding2013-10-312-30/+53
| | | | | | | | | | | | | | | | | | | | | | | | Use a structure to parameterize the code to handle differences between the HDMI hardware on various SoC generations. This removes the need to clutter the code with checks for individual compatible values. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: hdmi: Rename tegra{2,3} to tegra{20,30}Thierry Reding2013-10-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Everything related to Tegra uses Tegra20 and Tegra30 instead of Tegra2 and Tegra3, respectively. Rename the TMDS arrays in the HDMI driver for consistency. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | gpu: host1x: Add support for Tegra114Thierry Reding2013-10-317-1/+620
| | | | | | | | | | | | | | | | | | | | | Tegra114 uses a slightly updated version of host1x with an additional syncpoint. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Allocate resources at probe timeThierry Reding2013-10-315-27/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the .init() and .exit() functions are executed whenever the DRM driver is loaded or unloaded, care must be taken not to use them for resource allocation. Otherwise deferred probing cannot be used, since the .init() and .exit() are not run at probe time. Similarly the code that frees resources must be run at .remove() time. If it is run from the .exit() function, it can release resources multiple times. To handle this more consistently, rename the tegra_output_parse_dt() function to tegra_output_probe() and introduce tegra_output_remove() which can be used to free output-related resources. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Properly cleanup and zero out resourcesThierry Reding2013-10-313-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the DRM driver is unloaded, all the associated resources must be cleaned up and zeroed out. This is necessary because of the architecture of the Tegra DRM driver, where not all subdrivers are unloaded along with the DRM driver. Therefore device-managed managed won't be freed and memory cannot be assumed to have been cleared (because it hasn't been reallocated using kzalloc()) by the time the DRM driver is reloaded. It is therefore necessary to zero out the structures to prevent strange errors (such as slab corruptions) from occurring. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Move driver to DRM treeThierry Reding2013-10-3120-17/+26
| | | | | | | | | | | | | | | | | | | | | In order to make subsystem-wide changes easier, move the Tegra DRM driver back into the DRM tree. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | gpu: host1x: Use relative include pathsThierry Reding2013-10-317-26/+24
| | | | | | | | | | | | | | | | | | This is slightly safer than adding -Idrivers/gpu/host1x to cflags-y. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Move subdevice infrastructure to host1xThierry Reding2013-10-3111-364/+853
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Tegra DRM driver currently uses some infrastructure to defer the DRM core initialization until all required devices have registered. The same infrastructure can potentially be used by any other driver that requires more than a single sub-device of the host1x module. Make the infrastructure more generic and keep only the DRM specific code in the DRM part of the driver. Eventually this will make it easy to move the DRM driver part back to the DRM subsystem. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | gpu: host1x: Expose syncpt and channel functionalityThierry Reding2013-10-3113-254/+26
| | | | | | | | | | | | | | | | | | | | | Expose the buffer objects, syncpoint and channel functionality in the public public header so that drivers can use them. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Introduce tegra_drm_client structureThierry Reding2013-10-315-83/+94
| | | | | | | | | | | | | | | | | | | | | | | | This structure derives from host1x_client. DRM-specific fields are moved from host1x_client to this structure, so that host1x_client can remain agnostic of DRM. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | gpu: host1x: Make host1x header file publicThierry Reding2013-10-314-35/+5
| | | | | | | | | | | | | | | | | | | | | In preparation to support host1x clients other than DRM, move this header into a public location. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: gem: Miscellaneous cleanupsThierry Reding2013-10-311-11/+10
| | | | | | | | | | | | | | | | | | | | | Rename the host1x_to_drm_bo() macro to host1x_to_tegra_bo() for consistency and fixup various stylistic issues. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Rename gr2d to tegra-gr2dThierry Reding2013-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | Other drivers use the tegra- prefix in their names, so add it to this driver's name as well for consistency. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: gr2d: Miscellaneous cleanupsThierry Reding2013-10-311-51/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the address table code for the host1x firewall. The previous implementation allocated a bitfield but didn't check for a valid pointer so it could potentially crash. Instead, embed a static bitmap within the gr2d structure to avoid the allocation and use the Linux bitmap API to reduce code complexity. Don't annotate the driver's .remove() function __exit. Even if built in the driver can be unloaded via sysfs, so .remove() needs to stick around after initialization. Also remove the explicit initialization of the driver's .owner field to THIS_MODULE because that's now handled by the driver core. Furthermore make an error message more consistent with other subdrivers, index the syncpts array for better readability, remove a gratuituous newline and reorder some variable declarations to make the code easier to read. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | gpu: host1x: firewall: Refactor register checkThierry Reding2013-10-311-26/+31
| | | | | | | | | | | | | | | | | | | | | | | | The same code sequence is used in various places to validate a register access in the command stream. This can be refactored into a separate function. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | gpu: host1x: firewall: Rename cmdbuf_id -> cmdbufThierry Reding2013-10-311-5/+5
| | | | | | | | | | | | | | | | | | | | | The value stored in this field is a pointer to a command buffer, not an ID. Avoid some confusion by reflecting that in the field's name. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | gpu: host1x: Fix alignment of function argumentsThierry Reding2013-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | Arguments on subsequent lines should be aligned with the first argument. This one occurrence went unnoticed during code review. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | gpu: host1x: Do not discard .remove()Thierry Reding2013-10-311-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | The device can be unbound from the driver via sysfs, so regardless of whether the driver is builtin or a module, its .remove() function needs to stick around. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | gpu: host1x: Cleanup includesThierry Reding2013-10-319-51/+2
| | | | | | | | | | | | | | | | | | | | | Most of the included files are either not required or already included by some other header file. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Rename host1x_drm_context to tegra_drm_contextThierry Reding2013-10-313-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | The structure represents a context associated with a particular process that has opened the Tegra DRM device and requested a channel. This is a very DRM-specific notion and has nothing to do with host1x. Rename the structure to more clearly mark the boundaries between the two. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Rename host1x_drm_file to tegra_drm_fileThierry Reding2013-10-312-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This structure extends drm_file with Tegra DRM specific fields and has nothing to do with host1x. Rename the structure to more clearly mark the boundaries between host1x and Tegra DRM. While at it, move the structure definition out of the header. It's never used outside of the drm.c source file, so it can be defined within that. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Rename host1x_drm structure to tegra_drmThierry Reding2013-10-318-116/+115
| | | | | | | | | | | | | | | | | | | | | The host1x and Tegra DRM drivers are currently tightly coupled. Renaming the structure marks the boundary more clearly. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Cleanup tegra_dc structureThierry Reding2013-10-311-4/+1
| | | | | | | | | | | | | | | | | | | | | Remove the unused host1x field from the structure and group the fields more logically. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm/tegra: Remove unused fieldsThierry Reding2013-10-311-4/+0
| | | | | | | | | | | | | | | | | | | | | Some of the fields in struct host1x_drm haven't been used for a while, so remove them. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | gpu: host1x: Remove unused MakefileThierry Reding2013-10-311-6/+0
| | | | | | | | | | | | Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | gpu: host1x: check relocs after all gathers are consumedErik Faye-Lund2013-10-311-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The num_relocs count are passed to the kernel per job, not per gather. For multi-gather jobs, we would previously fail if there were relocs in other gathers aside from the first one. Fix this by simply moving the check until all gathers have been consumed. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> Acked-By: Terje Bergstrom <tbergstrom@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm: Fix typo in debug messageThierry Reding2013-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix a typo (iotcl -> ioctl) in the debug message when an unknown IOCTL is encountered. Acked-by: David Airlie <airlied@linux.ie> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * | drm: Track the proper DPMS mode of connectorsThierry Reding2013-10-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When userspace removes the active framebuffer using DRM_IOCTL_MODE_RMFB, or explicitly disables the CRTC (by calling drmModeSetCrtc(..., NULL) for example), a NULL framebuffer will be passed to the .set_config() implementation of a CRTC. The drm_crtc_helper_set_config() helper will decide to disable a CRTC when that happens. To do so, it calls drm_crtc_helper_disable(), which in turn will iterate over all encoders and decouple them from their connectors and finally call drm_helper_disable_unused_functions() to clean up and call the .disable() or .dpms() implementation for each encoder. However, at no point during this sequence does it track the DPMS mode of a connector, so it will usually remain on after this. When a connector is enabled again, drm_helper_connector_dpms() will not notice that the DPMS mode actually changed and won't do anything, which causes the connector to stay disabled indefinitely. To prevent this from happening, explicitly set the connector's DPMS mode to off when the CRTC is disabled. That way it reflects the correct state and can be enabled again. This solves an issue observed when terminating an X server running on the xf86-video-modesetting driver. Without this patch, the connector would not be enabled properly and the screen would stay dark. Acked-by: David Airlie <airlied@linux.ie> Signed-off-by: Thierry Reding <treding@nvidia.com>
* | | qxl: avoid an oops in the deferred io code.Dave Airlie2013-11-041-1/+1
| |/ |/| | | | | | | | | | | | | | | | | If we are using deferred io due to plymouth or X.org fbdev driver we will oops in memcpy due to this pointless multiply here, removing it fixes fbdev to start and not oops. Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/sysfs: Do not drop device reference twiceThierry Reding2013-10-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | device_unregister() already drops its reference to the struct device, so explicitly calling put_device() before device_unregister() can cause the device to have been freed before it can be unregistered. Signed-off-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Tested-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | Merge tag 'drm-intel-next-2013-10-18' of ↵Dave Airlie2013-10-2550-983/+2367
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://people.freedesktop.org/~danvet/drm-intel into drm-next - CRC support from Damien and He Shuang. Long term this should allow us to test an awful lot modesetting corner cases automatically. So for me as the maintainer this is really big. - HDMI audio fix from Jani. - VLV dpll computation code refactoring from Ville. - Fixups for the gpu booster from last time around (Chris). - Some cleanups in the context code from Ben. - More watermark work from Ville (we'll be getting there ...). - vblank timestamp improvements from Ville. - CONFIG_FB=n support, including drm core changes to make the fbdev helpers optional. - DP link training improvements (Jani). - mmio vtable from Ben, prep work for future hw. * tag 'drm-intel-next-2013-10-18' of git://people.freedesktop.org/~danvet/drm-intel: (132 commits) drm/i915/dp: don't mention eDP bpp clamping if it doesn't affect bpp drm/i915: remove dead code in ironlake_crtc_mode_set drm/i915: crc support for hsw drm/i915: fix CRC debugfs setup drm/i915: wait one vblank when disabling CRCs drm/i915: use ->get_vblank_counter for the crc frame counter drm/i915: wire up CRC interrupt for ilk/snb drm/i915: add CRC #defines for ilk/snb drm/i915: extract display_pipe_crc_update drm/i915: don't Oops in debugfs for I915_FBDEV=n drm/i915: set HDMI pixel clock in audio configuration drm/i915: pass mode to ELD write vfuncs cpufreq: Add dummy cpufreq_cpu_get/put for CONFIG_CPU_FREQ=n drm/i915: check gem bo size when creating framebuffers drm/i915: Use unsigned long for obj->user_pin_count drm/i915: prevent tiling changes on framebuffer backing storage drm/i915: grab dev->struct_mutex around framebuffer_init drm/i915: vlv: fix VGA hotplug after modeset drm: add support for additional stereo 3D modes drm/i915: preserve dispaly init order on ByT ...
| * | drm/i915/dp: don't mention eDP bpp clamping if it doesn't affect bppJani Nikula2013-10-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful with the follow-up patch that frobs dev_priv->vbt.edp_bpp, and the value no longer comes directly from VBT. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: remove dead code in ironlake_crtc_mode_setDaniel Vetter2013-10-181-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Jun 5 13:34:23 2013 +0200 drm/i915: consolidate pch pll enable sequence I've removed all the code from this if block, but somehow forgotten to kill the block itself. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: crc support for hswDaniel Vetter2013-10-183-20/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hw designers decided to change the CRC registers and coalesce them all into one. Otherwise nothing changed. I've opted for a new hsw_ version to grab the crc sample since hsw+1 will have the same crc registers, but different interrupt source registers. So this little helper function will come handy there. Also refactor the display error handler with a neat pipe loop. v2: Use for_each_pipe. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: fix CRC debugfs setupDaniel Vetter2013-10-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've set up all files, but removed only those for which we have a pipe. Which leaves the one for pipe C on machines with less than 2 pipes, breaking module reload. v2: We can't get at the drm device this early (wtf), so just register all the files and also remove them all again. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: wait one vblank when disabling CRCsDaniel Vetter2013-10-181-0/+2
| | | | | | | | | | | | | | | | | | | | | This avoids a spurious spurious interrupt warning. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: use ->get_vblank_counter for the crc frame counterDaniel Vetter2013-10-181-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | Suggested by Ville. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: wire up CRC interrupt for ilk/snbDaniel Vetter2013-10-184-19/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We enable the interrupt unconditionally and only control it through the enable bit in the CRC control register. v2: Extract per-platform helpers to compute the register values. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: add CRC #defines for ilk/snbDaniel Vetter2013-10-181-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add a new _PIPE_INC macro which takes an base plus increment. Much less likely to botch the job by missing an s/A/B/ somewhere. v2: They've moved the bitfield. Argh! Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: extract display_pipe_crc_updateDaniel Vetter2013-10-181-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | The ringbuffer update logic should always be the same, but different platforms have different amounts of CRC registers. Hence extract it. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: don't Oops in debugfs for I915_FBDEV=nDaniel Vetter2013-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Failed to properly test this. Reported-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: set HDMI pixel clock in audio configurationJani Nikula2013-10-182-5/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HDMI audio expects HDMI pixel clock to be set in the audio configuration. We've currently just set 0, using 25.2 / 1.001 kHz frequency, which fails with some modes. v2: Now with a commit message. Reference: http://mid.gmane.org/CAGpEb3Ep1LRZETPxHGRfBDqr5Ts2tAc8gCukWwugUf1U5NYv1g@mail.gmail.com Reference: http://mid.gmane.org/20130206213533.GA16367@hardeman.nu Reported-by: David Härdeman <david@hardeman.nu> Reported-by: Jasper Smet <josbeir@gmail.com> Tested-by: Jasper Smet <josbeir@gmail.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: pass mode to ELD write vfuncsJani Nikula2013-10-182-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be needed for setting the HDMI pixel clock for audio config. No functional changes. v2: Now with a commit message. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: check gem bo size when creating framebuffersDaniel Vetter2013-10-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's better to catch such fallout early, and this way we can rely on the checking done by the drm core on fb->heigh/width at modeset time. If we ever support planar formats on intel we might want to look into a common helper to do all this, but for now this is good enough. v2: Take tiling into account, requested by Ville. v3: Fix tile height on gen2, spotted by Ville. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Requested-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/i915: Use unsigned long for obj->user_pin_countDaniel Vetter2013-10-162-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least on linux sizeof(long) == sizeof(void*) and the thinking is that you can grab about as many references as there's memory. Doesn't really matter, just a bit of OCD since the fixed size data type in a pure in-kernel datastructure look off. v2: Ville asked for an overflow check since no one prevents userspace from incrementing the pin count forever. v3: s/INT/LONG/, noticed by Chris. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>