summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500
AgeCommit message (Collapse)Author
2013-07-24drm/gma500: Rename psb_intel_encoder to gma_encoderPatrik Jakobsson
The psb_intel_encoder is generic and should be named appropriately Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Rename psb_intel_connector to gma_connectorPatrik Jakobsson
The psb_intel_connector is generic and should be named appropriately Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Rename psb_intel_crtc to gma_crtcPatrik Jakobsson
The psb_intel_crtc is generic and should be named appropriately Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Convert to generic set_config()Patrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/psb: Convert to generic set_config()Patrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Add generic set_config() functionPatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Convert to generic save/restorePatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/psb: Convert to generic save/restorePatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Add generic crtc save/restore funcsPatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Convert to generic encoder funcsPatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Add generic encoder functionsPatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/psb: Convert to generic cursor funcsPatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Convert to generic cursor funcsPatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Add generic cursor functionsPatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/psb: Convert to generic crtc->destroyPatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/mdfld: Use identical generic crtc funcsPatrik Jakobsson
Use the generic gma functions instead of the medfield functions where they are identical. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/oak: Use identical generic crtc funcsPatrik Jakobsson
Use the generic gma functions instead of the oaktrail functions where they are identical. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/psb: Convert to gma_crtc_dpms()Patrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Convert to generic gamma funcsPatrik Jakobsson
This takes care of the remaining chips using the old generic code. We don't check if the pipe number is valid but the old code peeked in the register map before checking anyways so just ignore it. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/psb: Convert to gma_pipe_set_base()Patrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Convert to generic gamma funcsPatrik Jakobsson
There is a slight difference in how we pick the palette register in the generic function but we should be ok as long as psb_intel_crtc->pipe and the register map is sane. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Convert to gma_crtc_dpms()Patrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Add IS_CDV() macroPatrik Jakobsson
This macro is needed for Cedarview specific stuff in the generic gma functions. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Convert to gma_pipe_set_base()Patrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/psb: Use identical generic crtc funcsPatrik Jakobsson
This patch makes psb use the gma_xxx counterparts that are identical. I took them in one sweep as they should not cause any regressions. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Make all chips use gma_wait_for_vblankPatrik Jakobsson
Also remove the duplicated oaktrail function. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Use identical generic crtc funcsPatrik Jakobsson
This patch makes cdv use the gma_xxx counterparts that are identical. I took them in one sweep as they should not cause any regressions. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Add generic pipe/crtc functionsPatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Remove the unused psb_intel_display.hPatrik Jakobsson
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/psb: Make use of generic clock codePatrik Jakobsson
Add chip specific callbacks for the generic and non-generic clock calculation code. Also remove as much dupilicated code as possible. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Make use of gma_pipe_has_type()Patrik Jakobsson
Replace any use of xxx_intel_pipe_has_type() with the generic gma_pipe_has_type() function. Poulsbo still use it but that will be removed when we rip out psb_intel_pipe_has_type(). Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Make use of the generic clock codePatrik Jakobsson
Add chip specific callbacks for the generic and non-generic clock calculation code. Also remove as much dupilicated code as possible. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Add generic code for clock calculationPatrik Jakobsson
This patch aims to unify the bits and pieces that are common (or similar enough) for pll clock calculations. Nothing makes use of this code yet That will come in later patches. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-23drm/gem: simplify object initializationDavid Herrmann
drm_gem_object_init() and drm_gem_private_object_init() do exactly the same (except for shmem alloc) so make the first use the latter to reduce code duplication. Also drop the return code from drm_gem_private_object_init(). It seems unlikely that we will extend it any time soon so no reason to keep it around. This simplifies code paths in drivers, too. Last but not least, fix gma500 to call drm_gem_object_release() before freeing objects that were allocated via drm_gem_private_object_init(). That isn't actually necessary for now, but might be in the future. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Acked-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
2013-06-11Merge branch 'gma500-fixes' of git://github.com/patjak/drm-gma500 into drm-fixesDave Airlie
Patrik writes: Two fixes for memory leaks split into Cedarview and Poulsbo versions, and a fix for properly setting the pipe base when using fbdev. It's on my todo-list to start unifying the chips since they are very similar, but until then I'd like to split them up in case there are side-effects on Cedarview that I cannot currently test. airled: Verified pull from github matches what I expected. * 'gma500-fixes' of git://github.com/patjak/drm-gma500: drm/gma500/cdv: Fix cursor gem obj referencing on cdv drm/gma500/psb: Fix cursor gem obj referencing on psb drm/gma500/cdv: Unpin framebuffer on crtc disable drm/gma500/psb: Unpin framebuffer on crtc disable drm/gma500: Add fb gtt offset to fb base
2013-06-09drm/gma500/cdv: Fix cursor gem obj referencing on cdvPatrik Jakobsson
The internal crtc cursor gem object pointer was never set/updated since it was required to be set in the first place. Fixing this will make the pin/unpin count match and prevent cursor objects from leaking when userspace drops all references to it. Also make sure we drop the gem obj reference on failure. This patch only affects Cedarview chips. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-06-09drm/gma500/psb: Fix cursor gem obj referencing on psbPatrik Jakobsson
The internal crtc cursor gem object pointer was never set/updated since it was required to be set in the first place. Fixing this will make the pin/unpin count match and prevent cursor objects from leaking when userspace drops all references to it. Also make sure we drop the gem obj reference on failure. This patch only affects Poulsbo chips. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-06-09drm/gma500/cdv: Unpin framebuffer on crtc disablePatrik Jakobsson
The framebuffer needs to be unpinned in the crtc->disable callback because of previous pinning in psb_intel_pipe_set_base(). This will fix a memory leak where the framebuffer was released but not unpinned properly. This patch only affects Cedarview. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=889511 Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=812113 Cc: stable@vger.kernel.org Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-06-09drm/gma500/psb: Unpin framebuffer on crtc disablePatrik Jakobsson
The framebuffer needs to be unpinned in the crtc->disable callback because of previous pinning in psb_intel_pipe_set_base(). This will fix a memory leak where the framebuffer was released but not unpinned properly. This patch only affects Poulsbo. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=889511 Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=812113 Cc: stable@vger.kernel.org Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-05-15drm/gma500: Add fb gtt offset to fb basePatrik Jakobsson
Old code assumed framebuffer starts at base of stolen memory. Since the addition of hardware cursors, this might not be true anymore so add the gtt offset to the calculation. Reported-by: Holger Schurig <holgerschurig@gmail.com> Tested-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-05-02Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
Pull drm updates from Dave Airlie: "This is the main drm pull request for 3.10. Wierd bits: - OMAP drm changes required OMAP dss changes, in drivers/video, so I took them in here. - one more fbcon fix for font handover - VT switch avoidance in pm code - scatterlist helpers for gpu drivers - have acks from akpm Highlights: - qxl kms driver - driver for the spice qxl virtual GPU Nouveau: - fermi/kepler VRAM compression - GK110/nvf0 modesetting support. Tegra: - host1x core merged with 2D engine support i915: - vt switchless resume - more valleyview support - vblank fixes - modesetting pipe config rework radeon: - UVD engine support - SI chip tiling support - GPU registers initialisation from golden values. exynos: - device tree changes - fimc block support Otherwise: - bunches of fixes all over the place." * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (513 commits) qxl: update to new idr interfaces. drm/nouveau: fix build with nv50->nvc0 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() 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 ...
2013-04-26Merge branch 'gma500-fixes' of git://github.com/patjak/drm-gma500 into drm-nextDave Airlie
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 Jakobsson
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 Astier
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-17Merge branch 'gma500-next' of git://github.com/patjak/drm-gma500 into drm-nextDave Airlie
Patrik writes: I haven't had much review or testing on other platforms than Poulsbo but at least the following Cedarview bug has been squashed and no regressions reported: https://bugs.freedesktop.org/show_bug.cgi?id=58527 * 'gma500-next' of git://github.com/patjak/drm-gma500: drm/gma500: Add debugging info to psb_gtt_restore() drm/gma500: Check connector status before restoring sdvo gma500:fix build failure for 3.9-rc5 drm/gma500: Fix hibernation problems on sdvo encoders drm/gma500: Add hooks for hibernation drm/gma500: Activate the gtt rebuild on suspend/resume drm/gma500: Add support for rebuilding the gtt drm/gma500: Change fb name so pm-utils doesn't apply quirks gma500: Make VGA and HDMI connector hotpluggable drm/gma500: Clean up various defines drm/gma500: Remove unnecessary function exposure drm/gma500: Type clock limits directly into array and remove defines drm/gma500: Calculate clock in one function instead of three identical drm/gma500: Remove unused i8xx clock limits gma500: medfield: Fix possible NULL pointer dereference drivers: gpu: drm: gma500: Replaced calls kzalloc & memcpy with kmemdup gma500: remove unused drm_psb_no_fb
2013-04-15drm/gma500: Add debugging info to psb_gtt_restore()Patrik Jakobsson
This makes it easier to see what's going on during resume/restore. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-04-15drm/gma500: Check connector status before restoring sdvoPatrik Jakobsson
This patch fixes a bug introduced by: commit 749387dc8d8270b279f27a0a794cdf4f4a4aa774 Author: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Date: Sun Apr 7 16:35:50 2013 +0200 drm/gma500: Fix hibernation problems on sdvo encoders The bug is triggered when we do a mode set on a sdvo encoder with all connectors in the disconnected state. A crtc is considered enabled by drm even though all of its connectors are disconnected. Work around this by adding a check in our sdvo restore function. Also remove the unneeded dpms on. Prepare and Commit will take care of that. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-04-10gma500:fix build failure for 3.9-rc5Xiong Zhou
Last version of this patch is not clear enough and X86 duplicated. This patch fixes build failure of v3.9-rc5 and rc6. When config ACPI_VIDEO as m, DRM_GMA500 as y, here comes the failure. GMA5/600 needs acpi_video just like nouveau. And some tab type fix by the way. Failure message: drivers/built-in.o: In function `psb_driver_load': kernel-3.9-rc5/drivers/gpu/drm/gma500/psb_drv.c:340: \ undefined reference to `acpi_video_register' make: *** [vmlinux] Error 1 Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-04-07drm/gma500: Fix hibernation problems on sdvo encodersPatrik Jakobsson
The state of the SDVO chip is more difficult to save than the LVDS so we do a full mode set on the crtc to get SDVO operational again. The SDVOB/C register is also stored just in case we have special bits set in the future. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-04-07drm/gma500: Add hooks for hibernationPatrik Jakobsson
Currently we do whatever is done during suspend/resume but we might need some more work for hibernation so keep them in separate functions. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>