aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_fbdev.c
Commit message (Collapse)AuthorAgeFilesLines
...
* drm/omap: Stop using drm_framebuffer_unregister_privateDaniel Vetter2017-01-121-6/+2
| | | | | | | | | | | This is the deprecated function for when you embedded the framebuffer somewhere else (which breaks refcounting). But omapdrm is using drm_framebuffer_remove and a free-standing fb, so this is rendundant. Cc: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm: Nuke fb->depthVille Syrjälä2016-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace uses of fb->depth with fb->format->depth. Less duplicate information is a good thing. @@ struct drm_framebuffer *fb; expression E; @@ drm_helper_mode_fill_fb_struct(...) { ... - fb->depth = E; ... } @@ struct nouveau_framebuffer *fb; @@ - fb->base.depth + fb->base.format->depth @@ struct drm_framebuffer fb; @@ - fb.depth + fb.format->depth @@ struct drm_framebuffer *fb; @@ - fb->depth + fb->format->depth @@ struct drm_framebuffer fb; @@ - (fb.format->depth) + fb.format->depth @@ struct drm_framebuffer *fb; @@ - (fb->format->depth) + fb->format->depth @@ @@ struct drm_framebuffer { ... - unsigned int depth; ... }; v2: Drop the vmw stuff (Daniel) Rerun spatch due to code changes Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/omapdrm: use DRM_FB_HELPER_DEFAULT_OPS for fb_opsStefan Christ2016-11-141-4/+1
| | | | | | | Cc: Tomi Valkeinen <[email protected]> Signed-off-by: Stefan Christ <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/omapdrm: don't call drm_helper_disable_unused_functionsDaniel Vetter2016-06-211-3/+0
| | | | | | | | | | | It's a legacy helper function which won't do good with atomic helpers. Cc: Tomi Valkeinen <[email protected]> Cc: Laurent Pinchart <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Acked-by: Tomi Valkeinen <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm/omap: fix pitch round-upTomi Valkeinen2016-06-061-2/+2
| | | | | | | | | | | | | | | | | At the moment we calculate the buffer's pitch with: pitch = width * DIV_ROUND_UP(bpp, 8) For CLUT modes with bpp of 1/2/4/8 this gives wrong result, and the correct pitch is: pitch = DIV_ROUND_UP(width * bpp, 8) In practice this doesn't change anything, as we don't support CLUT modes, but it's better to have the pitch calculation correct. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Laurent Pinchart <[email protected]>
* drm/omap: remove align_pitch()Tomi Valkeinen2016-06-061-3/+2
| | | | | | | | | | | | The previous commit removed aligning the pitch to SGX's pitch requirement from align_pitch(). What's left is effectively a function that returns width * bytespp. To clean up the driver, we can remove the function and have the calculation inline in the two places which call align_pitch(). Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
* drm/omapdrm: Use unlocked gem unreferencingDaniel Vetter2016-04-201-1/+1
| | | | | | | | | | | | | | | | | | For drm_gem_object_unreference callers are required to hold dev->struct_mutex, which these paths don't. Enforcing this requirement has become a bit more strict with commit ef4c6270bf2867e2f8032e9614d1a8cfc6c71663 Author: Daniel Vetter <[email protected]> Date: Thu Oct 15 09:36:25 2015 +0200 drm/gem: Check locking in drm_gem_object_unreference Cc: Tomi Valkeinen <[email protected]> Cc: Laurent Pinchart <[email protected]> Acked-by: Tomi Valkeinen <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
* drm: omapdrm: Make fbdev emulation optionalLaurent Pinchart2015-12-311-0/+4
| | | | | | | | Don't compile the fbdev emulation code when fbdev emulation support is disabled. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
* drm/omap: fix fbdev pix format to support all platformsTomi Valkeinen2015-12-141-4/+1
| | | | | | | | | | | | | omap_fbdev always creates a framebuffer with ARGB8888 pixel format. On OMAP3 we have VIDEO1 overlay that does not support ARGB8888, and on OMAP2 none of the overlays support ARGB888. This patch changes the omap_fbdev's fb to XRGB8888, which is supported by all platforms. Signed-off-by: Tomi Valkeinen <[email protected]> Tested-by: H. Nikolaus Schaller <[email protected]> Acked-by: Laurent Pinchart <[email protected]>
* drm/omap: Use new drm_fb_helper functionsArchit Taneja2015-08-061-25/+13
| | | | | | | | | | | | | | | | | | | | Use the newly created wrapper drm_fb_helper functions instead of calling core fbdev functions directly. They also simplify the fb_info creation. v3: - Update error handling for new drm_fb_helper funcs. Check using IS_ERR() instead of checking for NULL. Reported-by: Dan Carpenter <[email protected]> v2: - No changes Cc: Tomi Valkeinen <[email protected]> Cc: Laurent Pinchart <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
* drm/omap: replace ALIGN(PAGE_SIZE) by PAGE_ALIGNFabian Frederick2015-07-021-1/+1
| | | | | | | | | | use mm.h definition Cc: David Airlie <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: [email protected] Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
* drm: omapdrm: Clean up #include'sLaurent Pinchart2015-06-121-3/+3
| | | | | | | | Use the <...> include style instead of "..." for DRM headers and sort the headers alphabetically to ease detection of duplicates. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
* drm: omapdrm: Remove manual update display supportLaurent Pinchart2015-03-201-53/+4
| | | | | | | | | All the manual update display code implements eventually ends up to just calls to omap_connector_flush(), currently implemented as an empty TODO stub. Remove it, the code can always be revived and implemented later if interest in manual update displays becomes a reality. Signed-off-by: Laurent Pinchart <[email protected]>
* drm/fb-helper: Propagate errors from initial config failureThierry Reding2015-01-211-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Make drm_fb_helper_initial_config() return an int rather than a bool so that the error can be properly propagated. While at it, update drivers to propagate errors further rather than just ignore them. v2: - cirrus: No cleanup is required, the top-level cirrus_driver_load() will do it as part of cirrus_driver_unload() in its cleanup path. Reported-by: Fengguang Wu <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Patrik Jakobsson <[email protected]> Cc: Rob Clark <[email protected]> Cc: Tomi Valkeinen <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Christian König <[email protected]> Cc: Ben Skeggs <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Patrik Jakobsson <[email protected]> Reviewed-by: Christian König <[email protected]> [danvet: Squash in simplification patch from kbuild.] Signed-off-by: Daniel Vetter <[email protected]>
* drm: Introduce drm_fb_helper_prepare()Thierry Reding2014-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | To implement hotplug detection in a race-free manner, drivers must call drm_kms_helper_poll_init() before hotplug events can be triggered. Such events can be triggered right after any of the encoders or connectors are initialized. At the same time, if the drm_fb_helper_hotplug_event() helper is used by a driver, then the poll helper requires some parts of the FB helper to be initialized to prevent a crash. At the same time, drm_fb_helper_init() requires information that is not necessarily available at such an early stage (number of CRTCs and connectors), so it cannot be used yet. Add a new helper, drm_fb_helper_prepare(), that initializes the bare minimum needed to allow drm_kms_helper_poll_init() to execute and any subsequent hotplug events to be processed properly. Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* drm: Constify struct drm_fb_helper_funcsThierry Reding2014-07-081-1/+1
| | | | | | | | | | There's no need for this to be modifiable. Make it const so that it can be put into the .rodata section. Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Acked-by: Russell King <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* drm/omap: fix missing unref to fb's buf objectTomi Valkeinen2014-04-141-0/+3
| | | | | | | | | | omap_fbdev_create() takes a reference to the fb's gem object with omap_gem_get_paddr(). However, it never releases it with omap_gem_put_paddr(). This patch adds the missing omap_gem_put_paddr() to omap_fbdev_free(). Signed-off-by: Tomi Valkeinen <[email protected]>
* drm: Drop all the stub gamma_get, gamma_set, load_lut functions from driversVille Syrjälä2013-06-171-14/+0
| | | | | | | | | | Many of the drivers didn't implement palette/gamma handling, but were forced to provide stubs for the hooks to avoid drm_fb_helper from oopsing. Now that the hooks are optional, we can eliminate all the stubs. Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2013-02-261-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull drm merge from Dave Airlie: "Highlights: - TI LCD controller KMS driver - TI OMAP KMS driver merged from staging - drop gma500 stub driver - the fbcon locking fixes - the vgacon dirty like zebra fix. - open firmware videomode and hdmi common code helpers - major locking rework for kms object handling - pageflip/cursor won't block on polling anymore! - fbcon helper and prime helper cleanups - i915: all over the map, haswell power well enhancements, valleyview macro horrors cleaned up, killing lots of legacy GTT code, - radeon: CS ioctl unification, deprecated UMS support, gpu reset rework, VM fixes - nouveau: reworked thermal code, external dp/tmds encoder support (anx9805), fences sleep instead of polling, - exynos: all over the driver fixes." Lovely conflict in radeon/evergreen_cs.c between commit de0babd60d8d ("drm/radeon: enforce use of radeon_get_ib_value when reading user cmd") and the new changes that modified that evergreen_dma_cs_parse() function. * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (508 commits) drm/tilcdc: only build on arm drm/i915: Revert hdmi HDP pin checks drm/tegra: Add list of framebuffers to debugfs drm/tegra: Fix color expansion drm/tegra: Split DC_CMD_STATE_CONTROL register write drm/tegra: Implement page-flipping support drm/tegra: Implement VBLANK support drm/tegra: Implement .mode_set_base() drm/tegra: Add plane support drm/tegra: Remove bogus tegra_framebuffer structure drm: Add consistency check for page-flipping drm/radeon: Use generic HDMI infoframe helpers drm/tegra: Use generic HDMI infoframe helpers drm: Add EDID helper documentation drm: Add HDMI infoframe helpers video: Add generic HDMI infoframe helpers drm: Add some missing forward declarations drm: Move mode tables to drm_edid.c drm: Remove duplicate drm_mode_cea_vic() gma500: Fix n, m1 and m2 clock limits for sdvo and lvds ...
* drm/omap: remove fbdev debug enter/leave hooksRob Clark2013-02-161-3/+0
| | | | | | | This will result in badness for drivers that do not implement mode_set_base_atomic(). So don't pretend like we can support this. Signed-off-by: Rob Clark <[email protected]>
* drm/omap: move out of stagingRob Clark2013-02-161-0/+402
Now that the omapdss interface has been reworked so that omapdrm can use dispc directly, we have been able to fix the remaining functional kms issues with omapdrm. And in the mean time the PM sequencing and many other of that open issues have been solved. So I think it makes sense to finally move omapdrm out of staging. Signed-off-by: Rob Clark <[email protected]>