History log of /linux-master/drivers/gpu/drm/gma500/psb_intel_display.c
Revision Date Author Comments
# 3599dfa1 16-Jan-2023 Thomas Zimmermann <tzimmermann@suse.de>

drm/gma500: Remove unnecessary include statements for drm_crtc_helper.h

Several source files include drm_crtc_helper.h without needing it or
only to get its transitive include statements; leading to unnecessary
compile-time dependencies.

Directly include required headers and drop drm_crtc_helper.h where
possible.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230116131235.18917-9-tzimmermann@suse.de


# 254e5e88 20-Jul-2022 Thomas Zimmermann <tzimmermann@suse.de>

drm: Remove unnecessary include statements of drm_plane_helper.h

Remove the include statement for drm_plane_helper.h from all the files
that don't need it. Althogh the header file is almost empty, many drivers
include it somewhere.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220720083058.15371-5-tzimmermann@suse.de


# 61fe0ab2 01-Apr-2022 Xiaomeng Tong <xiam0nd.tong@gmail.com>

drm/gma500: fix a missing break in psb_intel_crtc_mode_set

Instead of exiting the loop as expected when an entry is found, the
list_for_each_entry() continues until the traversal is complete.
when found the entry, add a break after the switch statement.

Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220401115018.9335-1-xiam0nd.tong@gmail.com


# bdef417d 26-Mar-2022 Xiaomeng Tong <xiam0nd.tong@gmail.com>

gma500: fix an incorrect NULL check on list iterator

The bug is here:
return crtc;

The list iterator value 'crtc' will *always* be set and non-NULL by
list_for_each_entry(), so it is incorrect to assume that the iterator
value will be NULL if the list is empty or no element is found.

To fix the bug, return 'crtc' when found, otherwise return NULL.

Cc: stable@vger.kernel.org
fixes: 89c78134cc54d ("gma500: Add Poulsbo support")
Signed-off-by: Xiaomeng Tong <xiam0nd.tong@gmail.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220327052028.2013-1-xiam0nd.tong@gmail.com


# b1a7d0dd 22-Mar-2022 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Make use of the drm connector iterator

This makes sure we're using proper locking when iterating the list of
connectors.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220322131742.11566-3-patrik.r.jakobsson@gmail.com


# 76feffd1 17-Mar-2022 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Don't store crtc_funcs in psb_ops

The drm_crtc_funcs are all generic and no chip specific functions are
necessary. We can therefore directly put gma_crtc_funcs into the
drm_crtc.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220317092555.17882-3-patrik.r.jakobsson@gmail.com


# a29c6f88 17-Mar-2022 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Move gma_intel_crtc_funcs into gma_display.c

All functions live in gma_display.c already so move the vtable. Also
shorten the name to gma_crtc_funcs.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220317092555.17882-2-patrik.r.jakobsson@gmail.com


# f2d061ed 15-Oct-2021 Thomas Zimmermann <tzimmermann@suse.de>

drm/gma500: Rename struct gtt_range to struct psb_gem_object

struct gtt_range represents a GEM object. Rename the structure to struct
psb_gem_object and update all users. No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-11-tzimmermann@suse.de


# 957a2d0e 15-Oct-2021 Thomas Zimmermann <tzimmermann@suse.de>

drm/gma500: Allocate GTT ranges in stolen memory with psb_gem_create()

Support private objects for stolen memory in psb_gem_create() and
convert users to psb_gem_create(). For stolen memory, psb_gem_create()
now initializes the GEM object via drm_gem_private_object_init().

In the fbdev setup, replace the open-coded initialization of struct
gtt_range with a call to psb_gem_create(). Use drm_gem_object_put()
for release.

In the cursor setup, use psb_gem_create() and get a real GEM object.
Previously the allocated instance of struct gtt_range was only partially
initialized. Release the cursor GEM object in gma_crtc_destroy(). The
release was missing from the original code.

With the conversion of all callers to psb_gem_create(), the extern
declarations of psb_gtt_alloc_range, psb_gtt_free_range and
psb_gem_object_func are not required any longer. Declare them as
static.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-5-tzimmermann@suse.de


# 1f9f6790 15-Oct-2021 Thomas Zimmermann <tzimmermann@suse.de>

drm/gma500: Move helpers for struct gtt_range from gtt.c to gem.c

Allocation and pinning helpers for struct gtt_range are GEM functions,
so move them to gem.c. No functional changes.

v2:
* keep docs for psb_gtt_{attach,detach}_pages() (Patrik)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211015084053.13708-2-tzimmermann@suse.de


# f71635e8 20-Sep-2021 Thomas Zimmermann <tzimmermann@suse.de>

drm/gma500: Replace references to dev_private with helper function

Replace most references to struct drm_device.dev_private with the new
helper function to_drm_psb_private(). The only references left are in
assignments and the helper itself.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210920141051.30988-2-tzimmermann@suse.de


# 93b0bb58 01-Feb-2021 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Unify crtc helpers

CDV crtc helpers are identical to other chips so use gma_ prefix for the
crtc helper struct and remove the CDV copy.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-4-patrik.r.jakobsson@gmail.com


# 14981b80 15-Jan-2021 Lee Jones <lee.jones@linaro.org>

drm/gma500/psb_intel_display: Demote kernel-doc formatting abuse

Fixes the following W=1 kernel build warning(s):

drivers/gpu/drm/gma500/psb_intel_display.c:79: warning: Function parameter or member 'dev' not described in 'psb_intel_panel_fitter_pipe'

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Eric Anholt <eric@anholt.net>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-25-lee.jones@linaro.org


# 42eabbe5 23-Jan-2020 Thomas Zimmermann <tzimmermann@suse.de>

drm/gma500: Convert to CRTC VBLANK callbacks

VBLANK callbacks in struct drm_driver are deprecated in favor of
their equivalents in struct drm_crtc_funcs. Convert gma500 over.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200123135943.24140-7-tzimmermann@suse.de


# f76c22ce 06-Nov-2019 Paul Kocialkowski <paul.kocialkowski@bootlin.com>

drm/gma500: Add page flip support on psb/cdv

Legacy (non-atomic) page flip support is added to the driver by using the
mode_set_base CRTC function, that allows configuring a new framebuffer for
display. Since the function requires the primary plane's fb to be set
already, this is done prior to calling the function in the page flip helper
and reverted if the flip fails.

The vblank interrupt handler is also refactored to support passing an event.
The PIPE_TE_STATUS bit is also considered to indicate vblank on medfield
only, as explained in psb_enable_vblank.

It was tested by running weston on both poulsbo and cedartrail.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191106094400.445834-3-paul.kocialkowski@bootlin.com


# a61127c2 29-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 335

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms and conditions of the gnu general public license
version 2 as published by the free software foundation this program
is distributed in the hope it will be useful but without any
warranty without even the implied warranty of merchantability or
fitness for a particular purpose see the gnu general public license
for more details you should have received a copy of the gnu general
public license along with this program if not write to the free
software foundation inc 51 franklin st fifth floor boston ma 02110
1301 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 111 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000436.567572064@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 0c7b178a 19-May-2019 Sam Ravnborg <sam@ravnborg.org>

drm/gma500: drop drmp.h include from all .c files

Drop remaining uses of the deprecated drmP.h in gma500

Replaced drmp.h with forward declarations or include files
as relevant.

Moved all include files to blocks in following order:
\#include <linux/*>

\#include <asm/*>

\#include <drm/*>

\#include ""

And within each block sort the include files alphabetically.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190519195526.3422-6-sam@ravnborg.org


# 9e084a57 13-Jul-2017 Peter Rosin <peda@axentia.se>

drm: gma500: remove dead code and pointless local lut storage

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


# cf48e292 30-Mar-2016 Daniel Vetter <daniel.vetter@ffwll.ch>

drm: Initialize a linear gamma table by default

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


# afe7ef91 16-Feb-2016 Carlos Palminha <CARLOS.PALMINHA@synopsys.com>

drm/gma: removed optional dummy crtc mode_fixup function.

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>


# d56f57ac 04-Dec-2015 Daniel Vetter <daniel.vetter@ffwll.ch>

drm/gma500: Move to private save/restore hooks

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)


# 45fe734c 11-Mar-2015 Jani Nikula <jani.nikula@intel.com>

drm/gma500: constify all struct drm_*_helper funcs pointers

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>


# 3cb9ae4f 29-Oct-2014 Daniel Vetter <daniel.vetter@ffwll.ch>

drm: Move drm_crtc_init from drm_crtc.h to drm_plane_helper.h

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>


# f4510a27 01-Apr-2014 Matt Roper <matthew.d.roper@intel.com>

drm: Replace crtc fb with primary plane fb (v3)

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>


# c269c685 05-Jan-2014 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Add backing type and base align to psb_gem_create()

We'll need this for our gem create ioctl in a later patch.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# ae0b9318 04-Jan-2014 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Remove unused ioctls

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>


# 4f224661 17-Oct-2013 Ville Syrjälä <ville.syrjala@linux.intel.com>

drm/gma500: Return -ENOENT when a mode object can't be found

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>


# 367e4408 22-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Rename psb_intel_encoder to gma_encoder

The psb_intel_encoder is generic and should be named appropriately

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# a3d5d75f 22-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Rename psb_intel_connector to gma_connector

The psb_intel_connector is generic and should be named appropriately

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# 6306865d 21-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Rename psb_intel_crtc to gma_crtc

The psb_intel_crtc is generic and should be named appropriately

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# 43a83027 12-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500/psb: Convert to generic set_config()

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# 0e5b26ab 12-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500/psb: Convert to generic save/restore

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# c9d49590 10-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Convert to generic encoder funcs

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# 561573bf 10-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500/psb: Convert to generic cursor funcs

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# b1255b88 10-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500/psb: Convert to generic crtc->destroy

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# 42568dd5 10-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500/psb: Convert to gma_crtc_dpms()

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# 6443ea1a 10-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Convert to generic gamma funcs

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>


# 00b1fe74 10-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500/psb: Convert to gma_pipe_set_base()

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# 4855177e 10-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500/psb: Use identical generic crtc funcs

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>


# d1fa08f3 09-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Make all chips use gma_wait_for_vblank

Also remove the duplicated oaktrail function.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# 7f67c067 02-Jul-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500/psb: Make use of generic clock code

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>


# 5ea75e0f 30-Jun-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Add generic code for clock calculation

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>


# 3463cf1a 26-May-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500/psb: Fix cursor gem obj referencing on psb

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>


# 820de86a 05-Jun-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500/psb: Unpin framebuffer on crtc disable

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>


# 9e8e4636 13-Mar-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Clean up various defines

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>


# 49ad8f54 14-Mar-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Remove unnecessary function exposure

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>


# 06da4912 13-Mar-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Type clock limits directly into array and remove defines

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>


# 1548060f 13-Mar-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Calculate clock in one function instead of three identical

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>


# 4e6bb70d 13-Mar-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

drm/gma500: Remove unused i8xx clock limits

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>


# 907a773b 16-Feb-2013 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

gma500: Fix n, m1 and m2 clock limits for sdvo and lvds

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>


# 4a68a74b 13-Aug-2012 Forest Bond <forest.bond@rapidrollout.com>

gma500: Consider CRTC initially active.

[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>


# e811f5ae 17-Jul-2012 Laurent Pinchart <laurent.pinchart@ideasonboard.com>

drm: Make the .mode_fixup() operations mode argument a const pointer

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>


# bc794829 21-May-2012 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

gma500: handle poulsbo cursor restriction

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>


# 213a8434 11-May-2012 Alan Cox <alan@linux.intel.com>

gma500: use the register map to clean up

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>


# 6256304b 11-May-2012 Alan Cox <alan@linux.intel.com>

gma500: introduce a structure describing each pipe

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>


# 2e33d6b9 08-Mar-2012 Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

gma500: psb_intel_display: drop unused variables

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>


# 3c1d08d7 08-Mar-2012 Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

gma500: mark psb_intel_pipe_set_base() as static

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>


# 412a3df1 08-Mar-2012 Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

gma500: drop unused psb_intel_modeset_cleanup()

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>


# c6265ff5 08-Mar-2012 Alan Cox <alan@linux.intel.com>

gma500: rework register stuff sanely

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>


# 648a8e34 08-Mar-2012 Alan Cox <alan@linux.intel.com>

gma500: now move the Oaktrail save state into its own structure

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>


# 5736995b 19-Dec-2011 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

gma500: Replace SDVO code with slightly modified version from i915

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>


# 1730f89b 19-Dec-2011 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

gma500: Fix encoder type checking for connectors

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>


# 75e9d019 19-Dec-2011 Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

gma500: Initial support for our encoder and connector structs

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>


# 01f2c773 19-Dec-2011 Ville Syrjälä <ville.syrjala@linux.intel.com>

drm: Replace pitch with pitches[] in drm_framebuffer

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>


# 89c78134 03-Nov-2011 Alan Cox <alan@linux.intel.com>

gma500: Add Poulsbo support

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>