summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/gma500/psb_intel_display.c
Commit message (Collapse)AuthorAgeFilesLines
* drm: gma500: remove dead code and pointless local lut storagePeter Rosin2017-08-041-6/+1
| | | | | | | | | | | | The redundant fb helpers .gamma_set and .gamma_get are no longer used. Remove the dead code and hook up the crtc .gamma_set to use the crtc gamma_store directly instead of duplicating that info locally. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20170713162538.22788-9-peda@axentia.se
* drm: Initialize a linear gamma table by defaultDaniel Vetter2016-05-311-7/+0
| | | | | | | | | | | | | | | Code stolen from gma500. This is just a minor bit of safety code that I spotted and figured it might be useful if we put it into the core. This is to make the get_gamma ioctl reflect likely reality even before the first set_gamma ioctl call. v2 on irc: Extend commit message per Maarten's suggestions. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459331485-28376-2-git-send-email-daniel.vetter@ffwll.ch
* drm/gma: removed optional dummy crtc mode_fixup function.Carlos Palminha2016-03-041-1/+0
| | | | | | | | This patch set nukes all the dummy crtc mode_fixup implementations. (made on top of Daniel topic/drm-misc branch) Signed-off-by: Carlos Palminha <palminha@synopsys.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm/gma500: Move to private save/restore hooksDaniel Vetter2015-12-081-2/+0
| | | | | | | | | | | | | | I want to remove the core ones since with atomic drivers system suspend/resume is solved much differently. And there's only 2 drivers (nouveau besides gma500) really using them. v2: Fixup build noise 0day reported. Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1449218769-16577-13-git-send-email-daniel.vetter@ffwll.ch Reviewed-by: Thierry Reding <treding@nvidia.com> (v1)
* drm/gma500: constify all struct drm_*_helper funcs pointersJani Nikula2015-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are not to be modified. Generated using the semantic patch: @@ @@ ( const struct drm_crtc_helper_funcs * | - struct drm_crtc_helper_funcs * + const struct drm_crtc_helper_funcs * ) @@ @@ ( const struct drm_encoder_helper_funcs * | - struct drm_encoder_helper_funcs * + const struct drm_encoder_helper_funcs * ) @@ @@ ( const struct drm_connector_helper_funcs * | - struct drm_connector_helper_funcs * + const struct drm_connector_helper_funcs * ) @@ @@ ( const struct drm_plane_helper_funcs * | - struct drm_plane_helper_funcs * + const struct drm_plane_helper_funcs * ) Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: Move drm_crtc_init from drm_crtc.h to drm_plane_helper.hDaniel Vetter2014-11-051-0/+1
| | | | | | | | | | | | | | | | | | | Just a bit of OCD cleanup on headers - this function isn't the core interface any more but just a helper for drivers who haven't yet transitioned to universal planes. Put the declaration at the right spot and sprinkle necessary #includes over all drivers. Maybe this helps to encourage driver maintainers to do the switch. v2: Fix #include ordering for tegra, reported by 0-day builder. v3: Include required headers, reported by Thierry. Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Thierry Reding <treding@nvidia.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
* drm: Replace crtc fb with primary plane fb (v3)Matt Roper2014-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that CRTC's have a primary plane, there's no need to track the framebuffer in the CRTC. Replace all references to the CRTC fb with the primary plane's fb. This patch was generated by the Coccinelle semantic patching tool using the following rules: @@ struct drm_crtc C; @@ - (C).fb + C.primary->fb @@ struct drm_crtc *C; @@ - (C)->fb + C->primary->fb v3: Generate patch via coccinelle. Actual removal of crtc->fb has been moved to a subsequent patch. v2: Fixup several lingering crtc->fb instances that were missed in the first patch iteration. [Rob Clark] Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
* drm/gma500: Add backing type and base align to psb_gem_create()Patrik Jakobsson2014-03-171-1/+2
| | | | | | We'll need this for our gem create ioctl in a later patch. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500: Remove unused ioctlsPatrik Jakobsson2014-03-171-27/+0
| | | | | | | All of these ioctls are unused and most of them just duplicate what drm already provides. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500: Return -ENOENT when a mode object can't be foundVille Syrjälä2013-11-061-1/+1
| | | | | | | Let's be a bit more consistent with our error values. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/gma500: Rename psb_intel_encoder to gma_encoderPatrik Jakobsson2013-07-241-6/+4
| | | | | | The psb_intel_encoder is generic and should be named appropriately Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500: Rename psb_intel_connector to gma_connectorPatrik Jakobsson2013-07-241-1/+1
| | | | | | The psb_intel_connector is generic and should be named appropriately Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500: Rename psb_intel_crtc to gma_crtcPatrik Jakobsson2013-07-241-51/+47
| | | | | | The psb_intel_crtc is generic and should be named appropriately Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500/psb: Convert to generic set_config()Patrik Jakobsson2013-07-241-17/+1
| | | | Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500/psb: Convert to generic save/restorePatrik Jakobsson2013-07-241-107/+2
| | | | Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500: Convert to generic encoder funcsPatrik Jakobsson2013-07-241-45/+2
| | | | Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500/psb: Convert to generic cursor funcsPatrik Jakobsson2013-07-241-155/+2
| | | | Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500/psb: Convert to generic crtc->destroyPatrik Jakobsson2013-07-241-22/+1
| | | | Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500/psb: Convert to gma_crtc_dpms()Patrik Jakobsson2013-07-241-103/+1
| | | | Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500: Convert to generic gamma funcsPatrik Jakobsson2013-07-241-68/+2
| | | | | | | | 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>
* drm/gma500/psb: Convert to gma_pipe_set_base()Patrik Jakobsson2013-07-241-72/+1
| | | | Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500/psb: Use identical generic crtc funcsPatrik Jakobsson2013-07-241-37/+4
| | | | | | | 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>
* drm/gma500: Make all chips use gma_wait_for_vblankPatrik Jakobsson2013-07-241-11/+5
| | | | | | Also remove the duplicated oaktrail function. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500/psb: Make use of generic clock codePatrik Jakobsson2013-07-241-164/+25
| | | | | | | 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>
* drm/gma500: Add generic code for clock calculationPatrik Jakobsson2013-07-241-0/+3
| | | | | | | | 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>
* drm/gma500/psb: Fix cursor gem obj referencing on psbPatrik Jakobsson2013-06-091-6/+13
| | | | | | | | | | | | | 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>
* drm/gma500/psb: Unpin framebuffer on crtc disablePatrik Jakobsson2013-06-091-0/+14
| | | | | | | | | | | | | 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>
* drm/gma500: Clean up various definesPatrik Jakobsson2013-03-171-2/+0
| | | | | | Remove unused defines that we'll never use and fix naming in some include guards Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500: Remove unnecessary function exposurePatrik Jakobsson2013-03-171-2/+2
| | | | | | | psb_intel_crtc_gamma_set() and psb_intel_crtc_destroy() aren't used outside of psb_intel_display.c right now so no need to expose them. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500: Type clock limits directly into array and remove definesPatrik Jakobsson2013-03-171-46/+20
| | | | | | | This makes it easier to read. We do the same for cdv so it becomes more consistent as well. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500: Calculate clock in one function instead of three identicalPatrik Jakobsson2013-03-171-23/+5
| | | | | | | | | | i9xx_clock() and i8xx_clock() did the same calc and psb_intel_clock() just called i9xx_clock() so just move it all into psb_intel_clock(). The same calculation is duplicated in cdv_intel_display.c as well so maybe we can share it later on. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* drm/gma500: Remove unused i8xx clock limitsPatrik Jakobsson2013-03-171-52/+2
| | | | Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
* gma500: Fix n, m1 and m2 clock limits for sdvo and lvdsPatrik Jakobsson2013-02-221-6/+6
| | | | | | | | | The values of n, m1 and m2 needs to be subtracted by 2 before writing them to the FP register. The dot clock calculation already thinks of these values in register form so we must also specify them as such. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: Consider CRTC initially active.Forest Bond2012-08-301-0/+3
| | | | | | | | | | | | | | | | [this one ideally should make 3.6 - it fixes the very annoying mode setting bug] This causes the pipe to be forced off prior to initial mode set, which roughly mirrors the behavior of the i915 driver. It fixes initial mode setting on my Intel DN2800MT (Cedarview) board. Without it, mode setting triggers an out-of-range error from the monitor for most modes, but only on initial configuration (i.e. they can be configured successfully from userspace after that). Signed-off-by: Forest Bond <forest.bond@rapidrollout.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Make the .mode_fixup() operations mode argument a const pointerLaurent Pinchart2012-07-191-1/+1
| | | | | | | | The passed mode must not be modified by the operation, make it const. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: handle poulsbo cursor restrictionPatrik Jakobsson2012-05-221-7/+55
| | | | | | | | | | | Poulsbo needs a physical address in the cursor base register. We allocate a stolen memory buffer and copy the cursor image provided by userspace into it. When/If we get our own userspace driver we can map this stolen memory directly. The patch also adds a mark in chip ops so we can identify devices that has this requirement. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: use the register map to clean upAlan Cox2012-05-111-141/+110
| | | | | Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: introduce a structure describing each pipeAlan Cox2012-05-111-24/+11
| | | | | | | | This starts the move away from lots of confused unions of per driver stuff inherited when we merged the drivers together. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: psb_intel_display: drop unused variablesKirill A. Shutemov2012-03-101-11/+2
| | | | | | Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: mark psb_intel_pipe_set_base() as staticKirill A. Shutemov2012-03-101-1/+1
| | | | | | Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: drop unused psb_intel_modeset_cleanup()Kirill A. Shutemov2012-03-101-7/+0
| | | | | | Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: rework register stuff sanelyAlan Cox2012-03-101-15/+16
| | | | | | | | | Rework registers handling to prepare for Medfield. Signed-off-by: Alan Cox <alan@linux.intel.com> [split out from a single big patch] Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: now move the Oaktrail save state into its own structureAlan Cox2012-03-101-11/+16
| | | | | Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: Replace SDVO code with slightly modified version from i915Patrik Jakobsson2011-12-201-0/+8
| | | | | | | | | | Our current SDVO implementation is not working properly, so replace it with a modified version of the i915. Further testing and debugging is needed to make sure we can handle the different SDVO setups and wiring. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: Fix encoder type checking for connectorsPatrik Jakobsson2011-12-201-12/+12
| | | | | | | | Fix cases where we need to know what encoder type is behind a given connector. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: Initial support for our encoder and connector structsPatrik Jakobsson2011-12-201-0/+7
| | | | | | | | | | First step towards adding i915 alike encoder and connector abstractions. This will make life easier when adding i915 output code into our driver. It also removes the old psb_intel_output struct. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Replace pitch with pitches[] in drm_framebufferVille Syrjälä2011-12-201-2/+2
| | | | | | | | | | Otherwise each driver would need to keep the information inside their own framebuffer object structure. Also add offsets[]. BOs on the other hand are driver specific, so those can be kept in driver specific structures. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* gma500: Add Poulsbo supportAlan Cox2011-11-161-0/+1431
This provides the specific code for Poulsbo, some of which is also used for the later chipsets. We support the GTT, the 2D engine (for console), and the display setup/management. We do not support 3D or the video overlays. In theory enough public info is available to do the video overlay work but that represents a large task. Framebuffer X will run nicely with this but do *NOT* use the VESA X server at the same time as KMS. With a Dell mini 10 things like Xfce4 are nice and usable even when compositing as the CPU has a good path to the memory. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud