aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-05-13drm/radeon: check incoming cliprects pointerKees Cook1-1/+1
The "boxes" parameter points into userspace memory. It should be verified like any other operation against user memory. Signed-off-by: Kees Cook <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2013-05-13drm/mgag200: Fix framebuffer base address programmingChristopher Harvey1-3/+24
Higher bits of the base address of framebuffers weren't being programmed properly. This caused framebuffers that didn't happen to be allocated at a low enough address to not be displayed properly. Signed-off-by: Christopher Harvey <[email protected]> Signed-off-by: Mathieu Larouche <[email protected]> Acked-by: Julia Lemire <[email protected]> Tested-by: Julia Lemire <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2013-05-13drm/mgag200: Convert counter delays to jiffiesChristopher Harvey1-9/+6
Signed-off-by: Christopher Harvey <[email protected]> Acked-by: Julia Lemire <[email protected]> Tested-by: Julia Lemire <[email protected]> Acked-by: Mathieu Larouche <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-13drm/mgag200: Fix writes into MGA1064_PIX_CLK_CTL registerChristopher Harvey1-21/+21
The original line, WREG_DAC(MGA1064_PIX_CLK_CTL_CLK_DIS, tmp); wrote tmp into MGA1064_PIX_CLK_CTL_CLK_DIS, where MGA1064_PIX_CLK_CTL_CLK_DIS is an offset into MGA1064_PIX_CLK_CTL. Change the line to write properly into MGA1064_PIX_CLK_CTL. There were other chunks of code nearby that use the same pattern (but work correctly), so this patch updates them all to use this new (slightly more efficient) write pattern. The WREG_DAC macro was causing the DAC_INDEX register to be set to the same value twice. WREG8(DAC_DATA, foo) takes advantage of the fact that DAC_INDEX is already at the value we want. Signed-off-by: Christopher Harvey <[email protected]> Acked-by: Julia Lemire <[email protected]> Tested-by: Julia Lemire <[email protected]> Acked-by: Mathieu Larouche <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2013-05-13drm/mgag200: Don't change unrelated registers during modesetChristopher Harvey1-5/+1
Registers in indices below 0x18 are totally unrelated to modesetting, so don't write 0's, or anything else into them on modeset. Most of these registers are hardware cursor related, so this existing code interferes with hardware cursor development. Signed-off-by: Christopher Harvey <[email protected]> Tested-by: Julia Lemire <[email protected]> Acked-by: Julia Lemire <[email protected]> Acked-by: Mathieu Larouche <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-13drm: Only print a debug message when the polled connector has changedLespiau, Damien1-6/+13
Suggested-by: Chris Wilson <[email protected]> Signed-off-by: Damien Lespiau <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-13drm: Make the HPD status updates debug logs more readableLespiau, Damien2-4/+7
Instead of just printing "status updated from 1 to 2", make those enum numbers immediately readable. v2: Also patch output_poll_execute() (Daniel Vetter) v3: Use drm_get_connector_status_name (Ville Syrjälä) Signed-off-by: Damien Lespiau <[email protected]> Reviewed-by: Jesse Barnes <[email protected]> (for v1) Signed-off-by: Dave Airlie <[email protected]>
2013-05-10drm: Use names of ioctls in debug tracesChris Cummins2-8/+15
The intention here is to make the output of dmesg with full verbosity a bit easier for a human to parse. This commit transforms: [drm:drm_ioctl], pid=699, cmd=0x6458, nr=0x58, dev 0xe200, auth=1 [drm:drm_ioctl], pid=699, cmd=0xc010645b, nr=0x5b, dev 0xe200, auth=1 [drm:drm_ioctl], pid=699, cmd=0xc0106461, nr=0x61, dev 0xe200, auth=1 [drm:drm_ioctl], pid=699, cmd=0xc01c64ae, nr=0xae, dev 0xe200, auth=1 [drm:drm_mode_addfb], [FB:32] [drm:drm_ioctl], pid=699, cmd=0xc0106464, nr=0x64, dev 0xe200, auth=1 [drm:drm_vm_open_locked], 0x7fd9302fe000,0x00a00000 [drm:drm_ioctl], pid=699, cmd=0x400c645f, nr=0x5f, dev 0xe200, auth=1 [drm:drm_ioctl], pid=699, cmd=0xc00464af, nr=0xaf, dev 0xe200, auth=1 [drm:intel_crtc_set_config], [CRTC:3] [NOFB] into: [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_THROTTLE [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_CREATE [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_SET_TILING [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, IOCTL_MODE_ADDFB [drm:drm_mode_addfb], [FB:32] [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_MMAP_GTT [drm:drm_vm_open_locked], 0x7fd9302fe000,0x00a00000 [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, I915_GEM_SET_DOMAIN [drm:drm_ioctl], pid=699, dev=0xe200, auth=1, DRM_IOCTL_MODE_RMFB [drm:intel_crtc_set_config], [CRTC:3] [NOFB] v2: drm_ioctls is now a constant (Ville Syrjälä) Signed-off-by: Chris Cummins <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-10drm: Remove pointless '-' characters from drm_fb_helper documentationVille Syrjälä1-8/+8
Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-10drm: Add kernel-doc for drm_fb_helper_funcs->initial_configVille Syrjälä1-0/+1
Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-10drm: refactor call to request_moduleKees Cook1-5/+1
This reduces the size of the stack frame when calling request_module(). Performing the sprintf before the call is not needed. Signed-off-by: Kees Cook <[email protected]> Acked-by: Paul Menzel <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-10drm: Don't prune modes loudly when a connector is disconnectedDamien Lespiau1-1/+3
drm_helper_probe_single_connector_modes() is responsible for pruning the previously detected modes on a disconnected connector. We don't really need to log, again, the full list of modes that used to be valid when connected. Signed-off-by: Damien Lespiau <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-10drm: Add missing break in the command line mode parsing codeDamien Lespiau1-0/+1
As we parse the string given on the command line one char at a time, it seems that we do want a break at every case. Signed-off-by: Damien Lespiau <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-10Merge branch 'for-linux-next' of ↵Dave Airlie10-90/+116
git://people.freedesktop.org/~danvet/drm-intel into drm-next Daniel writes: A few intel fixes for smaller issues and one revert for an sdv hack which we've wanted to kill anyway. Plus two drm patches included for your convenience, both regression fixers for mine own screw-ups. + both fixes for stolen mem handling. * 'for-linux-next' of git://people.freedesktop.org/~danvet/drm-intel: drm/i915: clear the stolen fb before resuming Revert "drm/i915: Calculate correct stolen size for GEN7+" drm/i915: hsw: fix link training for eDP on port-A Revert "drm/i915: revert eDP bpp clamping code changes" drm: don't check modeset locks in panic handler drm/i915: Fix pipe enabled mask for pipe C in WM calculations drm/mm: fix dump table BUG drm/i915: Always normalize return timeout for wait_timeout_ioctl
2013-05-07drm/i915: clear the stolen fb before resumingJani Nikula1-2/+14
Similar to commit 88afe715dd5469bc24ca7a19ac62dd3c241cab48 Author: Chris Wilson <[email protected]> Date: Sun Dec 16 12:15:41 2012 +0000 drm/i915: Clear the stolen fb before enabling but on the resume path. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=57191 Reported-and-tested-by: Nikolay Amiantov <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Cc: [email protected] (3.9 only) Signed-off-by: Daniel Vetter <[email protected]>
2013-05-07Revert "drm/i915: Calculate correct stolen size for GEN7+"Ben Widawsky2-16/+1
This reverts commit 03752f5b7b77b95d83479885040950fba1250850. This revert requires a bit of explanation on how I understand things work. Internally the architects/designers decide how the stolen encoding works. We put it in a doc. BIOS writers take these docs and implement it. Driver writers read the doc too, and read the value left by the BIOS writers, and then we make magic. The failing here is that in the docs we had[1] contained two different definitions for this register for Gen7. (We have both a PCI register, and an MMIO, and each of these were different). At the time [2] of 03752f5, we asked the architects what the correct value should be; but that doesn't match the reality (BIOS) unfortunately. So on all machines I can get my hands on, this revert is the right thing to do. I've also worked with the product group to confirm that they agree this revert is what we should do. People using HW made my "people" who both write their own BIOS, and have access to our docs (Apple?). Investigations are still ongoing about whether we need to add a list of machines needing special handling, but this patch should be the right thing for pretty much everyone. [1] The docs are still wrong on this one. Now instead of two registers with two definitions, we have one register with BOTH definitions, progress? [2] The open source PRMs have the "wrong" definitions in chapter Volume 1 part6, section 1.1.12. This digging was inspired by Paulo. Cc: Paulo Zanoni <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Acked-by: Jesse Barnes <[email protected]> [danvet: Augment the patch saying that it's still a bit unclear whether there are any machines out there with "wrong" firmware and whether we need to add a list to handle them specially.] Signed-off-by: Daniel Vetter <[email protected]>
2013-05-04drm/i915: hsw: fix link training for eDP on port-AImre Deak3-15/+50
According to BSpec the link training sequence for eDP on HSW port-A should be as follows: 1. link training: clock recovery 2. link training: equalization 3. link training: set idle transmission mode 4. display pipe enable 5. link training: disable (set normal mode) Contrary to this at the moment we don't do step 3. and we do step 5. before step 4. Fix this by setting idle transmission mode for eDP at the end of intel_dp_complete_link_train and adding a new intel_dp_stop_link_training function to disable link training. With these changes we'll end up with the following functions corresponding to the above steps: intel_dp_start_link_train -> step 1. intel_dp_complete_link_train -> step 2., step 3. intel_dp_stop_link_train -> step 5. For port-A we'll call intel_dp_stop_link_train only after enabling the pipe, for everything else we'll call it right after intel_dp_complete_link_train to preserve the current behavior. Tested on HSW/HSW-ULT. In v2: - Due to a HW issue we must set idle transmission mode for port-A too before enabling the pipe. Thanks for Arthur Runyan for explaining this. - Update the patch subject to make it clear that it's an eDP fix, DP is not affected. v3: - rename intel_dp_link_train() to intel_dp_set_link_train(), use 'val' instead 'l' as var name. (Paulo) Signed-off-by: Imre Deak <[email protected]> Reviewed-by: Paulo Zanoni <[email protected]> Tested-by: Paulo Zanoni <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-05-04Revert "drm/i915: revert eDP bpp clamping code changes"Daniel Vetter1-14/+4
This reverts commit 57c219633275c7e7413f8bc7be250dc092887458. It's an ugly hack for a Haswell SDV platform where the vbt doesn't seem to fully agree with the panel. Since it seems to cause issues on real eDP platform let's just kill this hack again. Reported-and-tested-by: Josh Boyer <[email protected]> References: https://lkml.org/lkml/2013/5/3/467 Cc: Paulo Zanoni <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-05-03qxl: update to new idr interfaces.Dave Airlie2-24/+16
Signed-off-by: Dave Airlie <[email protected]>
2013-05-03Merge branch 'server-fixes' into drm-nextDave Airlie9-11/+127
Merge the fixes for the server driver dirty update paths * server-fixes: drm/cirrus: deal with bo reserve fail in dirty update path drm/ast: deal with bo reserve fail in dirty update path drm/mgag200: deal with bo reserve fail in dirty update path
2013-05-03Merge tag 'omapdss-for-3.10-fixes' of ↵Dave Airlie10-106/+160
git://gitorious.org/linux-omap-dss2/linux into drm-next OMAPDSS fixes for 3.10: * Compilation fix when DSI is disabled in Kconfig * Basic deferred probe support to fix DT boot * tag 'omapdss-for-3.10-fixes' of git://gitorious.org/linux-omap-dss2/linux: OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found OMAPDSS: VENC: Add error handling for venc_probe_pdata OMAPDSS: HDMI: Add error handling for hdmi_probe_pdata OMAPDSS: RFBI: Add error handling for rfbi_probe_pdata OMAPDSS: DSI: Add error handling for dsi_probe_pdata OMAPDSS: SDI: Add error handling for sdi_probe_pdata OMAPDSS: DPI: Add error handling for dpi_probe_pdata OMAPDSS: VENC: use platform_driver_register() OMAPDSS: HDMI: use platform_driver_register() OMAPDSS: RFBI: use platform_driver_register() OMAPDSS: DSI: use platform_driver_register() OMAPDSS: SDI: use platform_driver_register() OMAPDSS: DPI: use platform_driver_register() OMAPFB: defer probe if no displays OMAPFB: use module_platform_driver() OMAPDSS: Makefile: move omapfb after panels OMAPDSS: DPI: fix compilation if DSI not compiled in
2013-05-03Merge branch 'drm-next-3.10-2' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie17-299/+284
into drm-next Just some fixes that have accumulated over the last couple of weeks and some new PCI ids. * 'drm-next-3.10-2' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: fix handling of v6 power tables drm/radeon: clarify family checks in pm table parsing drm/radeon: consolidate UVD clock programming drm/radeon: fix UPLL_REF_DIV_MASK definition radeon: add bo tracking debugfs drm/radeon: add new richland pci ids drm/radeon: add some new SI PCI ids drm/radeon: fix scratch reg handling for UVD fence drm/radeon: allocate SA bo in the requested domain drm/radeon: fix possible segfault when parsing pm tables drm/radeon: fix endian bugs in atom_allocate_fb_scratch()
2013-05-02drm: don't check modeset locks in panic handlerDaniel Vetter1-0/+4
Since we know that locking is broken in that case and it's more important to not flood the dmesg with random gunk. Cc: Dave Airlie <[email protected]> Cc: Borislav Petkov <[email protected]> References: http://lkml.kernel.org/r/[email protected] Cc: [email protected] Reported-and-tested-by: Borislav Petkov <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-05-03drm/nouveau: fix build with nv50->nvc0Dave Airlie1-1/+1
Signed-off-by: Dave Airlie <[email protected]>
2013-05-02drm/radeon: fix handling of v6 power tablesAlex Deucher1-6/+5
The code was mis-handling variable sized arrays. Reported-by: Sylvain BERTRAND <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2013-05-02drm/radeon: clarify family checks in pm table parsingAlex Deucher1-3/+3
We actually care about the chip family rather than the DCE version although functionally they are the same. Signed-off-by: Alex Deucher <[email protected]>
2013-05-02drm/radeon: consolidate UVD clock programmingChristian König6-278/+191
Instead of duplicating the code over and over again, just use a single function to handle the clock calculations. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-05-02drm/radeon: fix UPLL_REF_DIV_MASK definitionChristian König3-3/+3
Stupid copy & paste error over all generations. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-05-02radeon: add bo tracking debugfsJerome Glisse3-1/+59
This is to allow debugging of userspace program not freeing buffer after, which is basicly a memory leak. This print the list of all gem object along with their size and placement (VRAM,GTT,CPU) and with the pid of the task that created them. agd5f: add warning fix Signed-off-by: Jerome Glisse <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-05-02drm/radeon: add new richland pci idsAlex Deucher2-2/+6
Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2013-05-02drm/radeon: add some new SI PCI idsAlex Deucher1-0/+3
Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2013-05-02drm/radeon: fix scratch reg handling for UVD fenceChristian König1-1/+1
Also init the scratch reg to zero on the UVD ring. This fixes UVD on AGP based cards. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-05-02drm/radeon: allocate SA bo in the requested domainChristian König1-1/+1
This avoid moving the BO directly after allocating it. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-05-02drm/radeon: fix possible segfault when parsing pm tablesAlex Deucher1-1/+9
If we have a empty power table, bail early and allocate the default power state. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=63865 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2013-05-02drm/radeon: fix endian bugs in atom_allocate_fb_scratch()Alex Deucher1-3/+3
Reviwed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2013-05-02OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not foundTomi Valkeinen1-1/+1
If the I2C adapter needed by the TFP410 device is not available yet, return EPROBE_DEFER so that the device will get probed again. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: VENC: Add error handling for venc_probe_pdataTomi Valkeinen1-7/+15
Add proper error handling for venc_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the VENC driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: HDMI: Add error handling for hdmi_probe_pdataTomi Valkeinen1-7/+15
Add proper error handling for hdmi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the HDMI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: RFBI: Add error handling for rfbi_probe_pdataTomi Valkeinen1-7/+14
Add proper error handling for rfbi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the RFBI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: DSI: Add error handling for dsi_probe_pdataTomi Valkeinen1-7/+13
Add proper error handling for dsi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the DSI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: SDI: Add error handling for sdi_probe_pdataTomi Valkeinen1-7/+15
Add proper error handling for sdi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the SDI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: DPI: Add error handling for dpi_probe_pdataTomi Valkeinen1-7/+15
Add proper error handling for dpi_probe_pdata(). This will cause EPROBE_DEFER to be properly passed upwards, causing the DPI driver to be probed again later if a resource was missing. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: VENC: use platform_driver_register()Tomi Valkeinen1-6/+7
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: HDMI: use platform_driver_register()Tomi Valkeinen1-6/+7
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: RFBI: use platform_driver_register()Tomi Valkeinen1-6/+7
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: DSI: use platform_driver_register()Tomi Valkeinen1-7/+10
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: SDI: use platform_driver_register()Tomi Valkeinen1-6/+7
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPDSS: DPI: use platform_driver_register()Tomi Valkeinen1-7/+8
Use platform_driver_register() instead of platform_driver_probe() so that we can support EPROBE_DEFER. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPFB: defer probe if no displaysTomi Valkeinen1-1/+1
omapfb requires the panel drivers to have been probed when omapfb is initialized. omapfb does not support insertion of new panels after its probe. This causes a problem in case omapdss or the panel probes have been deferred due to EPROBE_DEFER error, as omapfb won't find any displays. As a quick fix, this patch changes the omapfb probe so that if omapfb does not find any displays, it'll return EPROBE_DEFER. This is not perfect, as with a board with no displays, omapfb will get deferred forever. Also, if the board has multiple displays, but only some of them have been probed, omapfb will start and leave the unprobed displays out. Signed-off-by: Tomi Valkeinen <[email protected]>
2013-05-02OMAPFB: use module_platform_driver()Tomi Valkeinen1-25/+3
Instead of using platform_driver_probe(), use module_platform_driver() so that we can support deferred probing. Signed-off-by: Tomi Valkeinen <[email protected]>