summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500/cdv_intel_display.c
AgeCommit message (Collapse)AuthorFilesLines
2016-03-04drm/gma: removed optional dummy crtc mode_fixup function.Carlos Palminha1-7/+6
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>
2015-12-08drm/gma500: Move to private save/restore hooksDaniel Vetter1-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)
2015-04-07drm/gma500: constify all struct drm_*_helper funcs pointersJani Nikula1-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>
2014-04-02drm: Replace crtc fb with primary plane fb (v3)Matt Roper1-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>
2014-03-17drm/gma500/cdv: Cedarview display cleanupsPatrik Jakobsson1-52/+19
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-08-15drm/gma500/cdv: Add and hook up chip op for disabling srPatrik Jakobsson1-3/+3
Add a callback hook to the chip ops struct to allow chips to have their specific self-refresh function. Currently only used by cdv. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-08-14drm/gma500/cdv: Add and hook up chip op for watermarksPatrik Jakobsson1-1/+1
Add a callback hook to the chip ops struct to allow chips to have their specific fifo watermark update function. Currently only cdv actually tries to set wms based on crtc configuration but if/when the other chips needs it we can attach a callback for them as well. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Rename psb_intel_encoder to gma_encoderPatrik Jakobsson1-5/+5
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_crtc to gma_crtcPatrik Jakobsson1-14/+14
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 Jakobsson1-20/+1
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Convert to generic save/restorePatrik Jakobsson1-170/+2
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500: Convert to generic encoder funcsPatrik Jakobsson1-2/+2
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Convert to generic cursor funcsPatrik Jakobsson1-128/+2
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Convert to generic gamma funcsPatrik Jakobsson1-69/+1
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 Jakobsson1-134/+3
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Convert to gma_pipe_set_base()Patrik Jakobsson1-76/+1
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-07-24drm/gma500/cdv: Use identical generic crtc funcsPatrik Jakobsson1-58/+16
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: Make use of gma_pipe_has_type()Patrik Jakobsson1-4/+4
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 Jakobsson1-163/+34
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-06-09drm/gma500/cdv: Fix cursor gem obj referencing on cdvPatrik Jakobsson1-5/+11
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/cdv: Unpin framebuffer on crtc disablePatrik Jakobsson1-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 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>
2012-08-24gma500: psb_intel_crtc: Drop crtc_enable flag.Forest Bond1-2/+0
This is set when setting DPMS on and off, but it isn't checked anywhere, so just remove it. Signed-off-by: Forest Bond <forest.bond@rapidrollout.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-24gma500: Fix comment mispelling in cdv_intel_limits definition.Forest Bond1-1/+1
Signed-off-by: Forest Bond <forest.bond@rapidrollout.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-24gma500/cdv: Fix call to cdv_intel_dp_set_m_nAlan Cox1-2/+2
We should be making this call not praying that the values are right. In addition as noted by Josiah Standing we should be calling this for eDP as well. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-24gma500/cdv: Add eDP supportZhao Yakui1-2/+40
Introduce the eDP support into the driver. This has been reworked a bit because kernel driver proper uses encoder/connectors while the legacy Intel driver uses the old output stuff. It also diverges on the backlight handling. The legacy Intel driver adds a panel abstraction based upon the i915 one. It's only really used for backlight bits and we have a perfectly good backlight abstraction which can extend instead. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> [ported to upstream driver, redid backlight abstraction] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-24gma500/cdv: sync up and add the displayport code to the buildAlan Cox1-3/+3
This is mostly just aligning bits of behaviour Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-24gma500/cdv: add the bits that don't need the new codeAlan Cox1-2/+97
Based on bits from Yakui <yakui.zhao@intel.com> We can import various little bits of code before we plumb it all in and hopefully this way catch any regressions more easily. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-24gma500: Program the DPLL lane based on the selected digitial portZhao Yakui1-31/+51
Based on the spec, the CRT output doesn't use the lane. And the HDMI B output uses the Lane0/1 while the HDMI C output uses the Lane 2/3. But currently it will program all the four lanes for the CRT/HDMI. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> [Ported to the in-kernel driver] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-08-24gma500: Fix incorrect SR issue when disabling CRTC already in disabled stateZhao Yakui1-4/+3
Currently when trying to call the DPMS off again for one CRTC with DPMS off, it will firstly disable the SR and can't enable it again because of the incorrect check/logic. In such case the self refresh is still disabled although one CRTC pipe is active. This is wrong. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> [Ported to in kernel driver] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-20drm: Make the .mode_fixup() operations mode argument a const pointerLaurent Pinchart1-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>
2012-05-11gma500: use the register map to clean upAlan Cox1-155/+135
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-11gma500: introduce a structure describing each pipeAlan Cox1-23/+10
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>
2012-04-27cdv: continue synching up with updated reference codeAlan Cox1-34/+27
In particular clean up the errata handling and correct the crtc masks. We do this a bit differently using our device abstraction for neatness. This doesn't address the ACPI opregion and hotplug plumbing, nor the IRQ related changes that will need. It touches on backlight init but the full backlight support is not in this change set. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-27gma500: Update the Cedarview clock handlingAlan Cox1-65/+266
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-10gma500: cdv_intel_crt: mark few functions as staticKirill A. Shutemov1-3/+3
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>
2012-03-10gma500: cdv_intel_crt: drop unused variablesKirill A. Shutemov1-9/+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>
2012-03-10gma500: cdv_intel_crt: drop dead codeKirill A. Shutemov1-47/+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>
2012-03-10gma500: rework register stuff sanelyAlan Cox1-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>
2012-03-10gma500: now move the Oaktrail save state into its own structureAlan Cox1-11/+16
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-20gma500: Convert Cedarview to work with new output handlingPatrik Jakobsson1-7/+7
Replace psb_intel_output with psb_intel_encoder and psb_intel_connector. Things will need to be cleaned up and tested so consider this an initial patch for Cedarview. 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>
2011-12-20drm: Replace pitch with pitches[] in drm_framebufferVille Syrjälä1-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>
2011-11-16gma500: Add support for CedarviewAlan Cox1-0/+1508
Again this is similar but has some differences so we have a set of plug in support. This does make the driver bigger than is needed in some respects but the tradeoff for maintainability is huge. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>