aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/shmobile (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-04-01drm: Replace crtc fb with primary plane fb (v3)Matt Roper1-7/+7
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-04-01drm/shmobile: Restrict plane loops to only operate on legacy planesMatt Roper1-1/+1
Ensure that existing driver loops over all planes do not change behavior when we begin adding new types of planes (primary and cursor) to the DRM plane list in future patches. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2013-12-18drm/shmob: call drm_put_dev directly from ->remove hookDaniel Vetter1-1/+3
We need to chase one pointer here. Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-12-18drm: shmob_drm: Check clk_prepare_enable() return valueLaurent Pinchart1-4/+14
The clk_prepare_enable() call can fail. Check it's return value. We can't propagate it all the way to the user as the KMS operations in which the clock is enabled return a void. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-11-10drm: shmob_drm: Convert to clk_prepare/unprepareLaurent Pinchart1-2/+2
Turn clk_enable() and clk_disable() calls into clk_prepare_enable() and clk_disable_unprepare() to get ready for the migration to the common clock framework. Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-11-06drm: shmobile: Add dependency on BACKLIGHT_CLASS_DEVICELaurent Pinchart1-0/+1
The driver registers a backlight device and thus requires BACKLIGHT_CLASS_DEVICE to be selected to avoid compilation breakages. Cc: stable@vger.kernel.org Reported-by: Russell King <linux@arm.linux.org.uk> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-10-11drm: Add separate Kconfig option for fbdev helpersDaniel Vetter1-0/+1
For drivers which might want to disable fbdev legacy support. Select the new option in all drivers for now, so this shouldn't result in any change. Drivers need some work anyway to make fbdev support optional (if they have it implemented, that is), so the recommended way to expose this is by adding per-driver options. At least as long as most drivers don't support disabling the fbdev support. v2: Update for new drm drivers msm and rcar-du. Note that Rob's msm driver can already take advantage of this, which allows us to build msm without any fbdev depencies in the kernel! v3: Move the MODULE_* stuff from the fbdev helper file to drm_crtc_helper.c. Cc: David Herrmann <dh.herrmann@gmail.com> Cc: Rob Clark <robdclark@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Acked-by: Dave Airlie <airlied@linux.ie> Reviewed-by: Chon Ming Lee <chon.ming.lee@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-30drm: Pass page flip ioctl flags to driverKeith Packard1-1/+2
This lets drivers see the flags requested by the application [airlied: fixup for rcar/imx/msm] Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
2013-08-19drm: remove FASYNC supportDaniel Vetter1-1/+0
So I've stumbled over drm_fasync and wondered what it does. Digging that up is quite a story. First I've had to read up on what this does and ended up being rather bewildered why peopled loved signals so much back in the days that they've created SIGIO just for that ... Then I wondered how this ever works, and what that strange "No-op." comment right above it should mean. After all calling the core fasync helper is pretty obviously not a noop. After reading through the kernels FASYNC implementation I've noticed that signals are only sent out to the processes attached with FASYNC by calling kill_fasync. No merged drm driver has ever done that. After more digging I've found out that the only driver that ever used this is the so called GAMMA driver. I've frankly never heard of such a gpu brand ever before. Now FASYNC seems to not have been the only bad thing with that driver, since Dave Airlie removed it from the drm driver with prejudice: commit 1430163b4bbf7b00367ea1066c1c5fe85dbeefed Author: Dave Airlie <airlied@linux.ie> Date: Sun Aug 29 12:04:35 2004 +0000 Drop GAMMA DRM from a great height ... Long story short, the drm fasync support seems to be doing absolutely nothing. And the only user of it was never merged into the upstream kernel. And we don't need any fops->fasync callback since the fcntl implementation in the kernel already implements the noop case correctly. So stop this particular cargo-cult and rip it all out. v2: Kill drm_fasync assignments in rcar (newly added) and imx drivers (somehow I've missed that one in staging). Also drop the reference in the drm DocBook. ARM compile-fail reported by Rob Clark. v3: Move the removal of dev->buf_asnyc assignment in drm_setup to this patch here. v4: Actually git add ... tsk. Cc: Dave Airlie <airlied@linux.ie> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Rob Clark <robdclark@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-08-07drm/gem: create drm_gem_dumb_destroyDaniel Vetter1-1/+1
All the gem based kms drivers really want the same function to destroy a dumb framebuffer backing storage object. So give it to them and roll it out in all drivers. This still leaves the option open for kms drivers which don't use GEM for backing storage, but it does decently simplify matters for gem drivers. Acked-by: Inki Dae <inki.dae@samsung.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org> Cc: Ben Skeggs <skeggsb@gmail.com> Reviwed-by: Rob Clark <robdclark@gmail.com> Cc: Alex Deucher <alexdeucher@gmail.com> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-07-17drm/shmobile: Use the GEM PRIME helpersLaurent Pinchart1-2/+7
The GEM CMA PRIME import/export helpers have been removed in favor of generic GEM PRIME helpers with GEM CMA low-level operations. Fix the driver accordingly. Reported-by: Mark Brown <broonie@linaro.org> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Mark Brown <broonie@linaro.org>
2013-06-20drm/shmobile: Enable compilation on all ARM platformsLaurent Pinchart1-1/+1
This is required to support multi-arch kernels. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-06-20drm/shmobile: Add DRM PRIME supportLaurent Pinchart1-1/+6
Just use the GEM CMA DRM PRIME helpers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-06-20drm/shmobile: Use devm_* managed functionsLaurent Pinchart2-25/+10
This simplifies cleanup paths and fixes a probe time crash in the error path when trying to cleanup mode setting before it was initialized. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-06-20drm/shmobile: Minor typo fix in debug messageLaurent Pinchart1-1/+1
Warning that an invalid value is valid doesn't make much sense, fix the message. Reported-by: Rob Clark <rob.clark@linaro.org> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-06-20drm/shmobile: Drop usage of removed drm_plane enabled fieldLaurent Pinchart1-1/+1
The enabled field has been removed from struct drm_plane. Don't use it in the driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-05-22drm/shmob: use drm_send_vblank_event() helperRob Clark1-15/+4
Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-04-26drm/shmobile: Fix race condition between page flip request and handlerLaurent Pinchart1-1/+1
The page flip handler stores the page flip event pointer and then calls drm_vblank_get() to enable the vblank interrupt. Due to the vblank off delay, the vblank interrupt can be enabled in the hardware at that point, even if the vblank reference count is equal to 0. If a vblank interrupt is triggered between storing the event pointer and calling drm_vblank_get(), the page flip completion handler will process the event and call drm_vblank_put() with a reference count equal to 0. This will result in a BUG_ON. Fix the race condition by calling drm_vblank_get() before storing the event pointer. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-01-20drm/shmobile: use drm_modeset_lock_allDaniel Vetter1-2/+2
Only a resume method to account for. v2: Fixup compilation. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-01-03Drivers: gpu: remove __dev* attributes.Greg Kroah-Hartman1-5/+5
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-30drm/shmob: drm_connector_property -> drm_object_propertyRob Clark1-1/+1
Signed-off-by: Rob Clark <rob@ti.com>
2012-10-23drm: platform: Don't initialize driver-private dataThierry Reding1-7/+5
Platform device drivers usually use the driver-private data for their own purposes. Having it overwritten by drm_platform_init() is confusing and error-prone. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-18drm: Renesas SH Mobile DRM driverLaurent Pinchart13-0/+2156
The SH Mobile LCD controller (LCDC) DRM driver supports the main graphics plane in RGB and YUV formats, as well as the overlay planes (in alpha-blending mode only). Only flat panel outputs using the parallel interface are supported. Support for SYS panels, HDMI and DSI is currently not implemented. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>