aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss/venc.c
AgeCommit message (Collapse)AuthorFilesLines
2018-09-03drm/omap: dss: Move common device operations to common structureLaurent Pinchart1-2/+2
The various types of omapdss_*_ops structures define multiple operations that are not specific to a bus type. To simplify the code and remove dependencies on specific bus types move those operations to a common structure. Operations that are specific to a bus type are kept in the specialized ops structures. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2018-09-03drm/omap: dss: Remove DSS encoders get_timings operationLaurent Pinchart1-13/+0
The get_timings operation from DSS encoders (not to be confused with the identically named operation in omap_dss_driver) is never called. Remove it. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2018-09-03drm/omap: dss: Remove omapdss_atv_ops get_wss and set_wss operationsLaurent Pinchart1-41/+0
The operations are never used, remove them. If the need to set wide screen signaling data arises later, it should be implemented by extending the DRM bridge API. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2018-06-28drm/omap: fix email addressTomi Valkeinen1-1/+1
Change [email protected] to [email protected]. Signed-off-by: Tomi Valkeinen <[email protected]>
2018-03-01drm: omapdrm: venc: Allocate the venc private data structure dynamicallyLaurent Pinchart1-204/+238
The venc private data structure is currently stored as a global variable. While no platform with multiple VENC encoders currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]>
2018-03-01drm: omapdrm: dispc: Pass DISPC pointer to remaining dispc API functionsLaurent Pinchart1-1/+1
This removes the need to access the global DISPC private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DISPC private data dynamically). Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]>
2018-03-01drm: omapdrm: dispc: Pass DISPC pointer to dispc_ops operationsLaurent Pinchart1-2/+2
This removes the need to access the global DISPC private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DISPC private data dynamically). In order to allow the omapdrm side to call the dispc_ops with a DISPC pointer, we also introduce a new function dss_get_dispc() to retrieve the DISPC corresponding to the DSS. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]>
2018-03-01drm: omapdrm: dss: Pass omap_dss_device pointer to dss_mgr_*() functionsLaurent Pinchart1-12/+6
The dss_mgr_*() functions take a channel argument to identify the channel they operate on. This prevents the functions from accessing driver data structures without resorting to global variables. In an effort to remove global variables, pass the omap_dss_device pointer associated with the channel instead. This will be used to look up the omap_drm_private data structure to pass to the dss_mgr_ops. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]>
2018-03-01drm: omapdrm: dss: Store the debugfs root directory in struct dss_deviceLaurent Pinchart1-1/+2
As part of an effort to remove the usage of global variables in the driver, store the debugfs root directory in the dss_device structure instead of a global variable. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]>
2018-03-01drm: omapdrm: dss: Support passing private data to debugfs show handlersLaurent Pinchart1-3/+8
To simplify implementation of debugfs seq_file show handlers, the driver passes the pointer to the show function through the debugfs_create_file data pointer. This prevents using the pointer to pass driver private data to the show handler, and requires all handlers to use global variables to access private data. To prepare for the removal of global private data in the driver, rework the debugfs infrastructure to allow passing a private data pointer to show handlers. The price to pay is explicit removal of debugfs files to free the internally allocated memory. This is desirable anyway as debugfs entries should be removed when a component driver is unbound, otherwise crashes will occur due to access to freed memory when the components will be dynamically allocated instead of stored in global variables. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]>
2018-03-01drm: omapdrm: dss: Pass DSS pointer to remaining dss functionsLaurent Pinchart1-4/+7
This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]>
2017-12-19drm: omapdrm: Simplify platform registrationAndrew F. Davis1-11/+1
Currently, calls into each file are used to register the various platform drivers. Change this to a table of pointers to platform_driver structs to allow using platform_register_drivers. Signed-off-by: Andrew F. Davis <[email protected]>
2017-12-19drm: omapdrm: Remove filename from header and fix copyright tagAndrew F. Davis1-2/+0
Having the filename in the header serves little purpose and is often wrong after renames as it is here in several places, just drop it from all omapdrm files. While we are here unify the copyright tags to the TI recommended style. Signed-off-by: Andrew F. Davis <[email protected]>
2017-12-19drm: omapdrm: venc: Return error code on OF parsing failureLaurent Pinchart1-2/+2
The venc_probe_of() function has an error cleanup path that returns success instead of an error code. Fix it. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-23drm/omap: fix analog tv-out modecheckTomi Valkeinen1-14/+51
omapdrm rejects all venc (analog tv-out) videomodes, due to somewhat strict checking of the values, making tv-out unusable. We only support two videomodes, one for PAL and one for NTSC, so instead of trying to check every field in the videomode struct, this patch makes the driver check only the pixel clock and the size of the display. Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: Remove dss_features.hLaurent Pinchart1-1/+0
The header file only contains four macros, two of which are never used. Move the other two to dss.h and remove dss_features.h. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: Move FEAT_VENC_REQUIRES_TV_DAC_CLK to venc driverLaurent Pinchart1-1/+13
The FEAT_VENC_REQUIRES_TV_DAC_CLK is specific to the VENC, move it from the omap_dss_features structure to the venc driver. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-08-15drm: omapdrm: venc: Don't export omap_dss_pal_vm and omap_dss_ntsc_vmLaurent Pinchart1-4/+2
The two variables are never used outside of their compilation unit, make them static. Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-06-02drm/omap: venc: remove set_type & invert_vid_out_polarityTomi Valkeinen1-23/+0
Non-DT booting is no longer supported, so remove legacy code. Signed-off-by: Tomi Valkeinen <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]>
2017-06-02drm: omapdrm: Drop support for non-DT devicesLaurent Pinchart1-11/+5
All OMAP platforms use DT nowadays, drop support for non-DT devices. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-06-02drm: omapdrm: Remove duplicate error messages when mapping memoryLaurent Pinchart1-11/+3
The devm_ioremap_resource() call can handle being given a NULL resource, and prints an error message when mapping fails. Switch the remaining devm_ioremap() calls to devm_ioremap_resource() and remove all extraneous resource NULL checks and error messages printed manually by the driver. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2017-04-06drm: omap: use common OF graph helpersRob Herring1-1/+2
The OMAP driver has its own OF graph helpers that are similar to the common helpers. This commit replaces most of the calls with the common helpers. There's still a couple of custom helpers left, but the driver needs more extensive changes to get rid of them. In dss_init_ports, we invert the loop, looping through the known ports and matching them to DT nodes rather than looping thru DT nodes and matching them to the ports. Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Sean Paul <[email protected]>
2016-11-02drm/omap: Use consistent name for struct videomodePeter Ujfalusi1-20/+19
Use 'vm' to refer to a struct videomode instead of 'p', 't', 'timings' or something else. The code will be easier to follow if we use consistent names. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: Replace struct omap_video_timings with videomodePeter Ujfalusi1-7/+7
omap_video_timings can be replaced with the generic videomode in omapdrm and the omap_video_timings can be removed. This patch will replace the omap_video_timings with videomode. With the change we no longer need the functions to convert to/from videomode and drm_display_mode to omap_video_timings, these can be removed as well. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: Use display_flags for sync edgePeter Ujfalusi1-6/+4
In preparation to move the stack to use the generic videmode struct for display timing information use display_flags for sync edge. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: Use display_flags for pixel data edgePeter Ujfalusi1-4/+4
In preparation to move the stack to use the generic videmode struct for display timing information use display_flags for pixel data edge. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: Use display_flags for DE levelPeter Ujfalusi1-4/+2
In preparation to move the stack to use the generic videmode struct for display timing information use display_flags for DE level. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: Use display_flags for h/vsync levelPeter Ujfalusi1-6/+4
In preparation to move the stack to use the generic videmode struct for display timing information use display_flags for h/vsync level. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: Use display_flags for interlace modePeter Ujfalusi1-4/+4
Remove the interlace member and add display_flags to omap_video_timings to configure the interlace mode. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename vbp to vback_porchPeter Ujfalusi1-2/+2
In preparation to move the stack to use the generic videmode struct for display timing information rename the vbp member to vback_porch. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename vfp to vfront_porchPeter Ujfalusi1-2/+2
In preparation to move the stack to use the generic videmode struct for display timing information rename the vfp member to vfront_porch. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename vsw to vsync_lenPeter Ujfalusi1-2/+2
In preparation to move the stack to use the generic videmode struct for display timing information rename the vsw member to vsync_len. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename hbp to hback_porchPeter Ujfalusi1-2/+2
In preparation to move the stack to use the generic videmode struct for display timing information rename the hbp member to hback_porch. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename hfp to hfront_porchPeter Ujfalusi1-2/+2
In preparation to move the stack to use the generic videmode struct for display timing information rename the hfp member to hfront_porch. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename hsw to hsync_lenPeter Ujfalusi1-2/+2
In preparation to move the stack to use the generic videmode struct for display timing information rename the hsw member to hsync_len. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename y_res to vactivePeter Ujfalusi1-2/+2
In preparation to move the stack to use the generic videmode struct for display timing information rename the y_res member to vactive. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-11-02drm/omap: omap_display_timings: rename x_res to hactivePeter Ujfalusi1-2/+2
In preparation to move the stack to use the generic videmode struct for display timing information rename the x_res member to hactive. Signed-off-by: Peter Ujfalusi <[email protected]> Signed-off-by: Tomi Valkeinen <[email protected]>
2016-06-03drm/omap: Do not include video/omapdss.h directly in driversPeter Ujfalusi1-2/+1
All drivers to include the omapdrm/dss/omapdss.h header file. This header includes the <video/omapdss.h> Signed-off-by: Peter Ujfalusi <[email protected]>
2016-03-03drm/omap: VENC: remove uses of omap_overlay_managerTomi Valkeinen1-13/+11
We are removing the uses of 'struct omap_overlay_manager'. This patch changes VENC driver to use 'omap_channel' instead. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: remove extra manager checks on disconnectTomi Valkeinen1-2/+1
The DSS output drivers check 'dssdev->manager' in disconnect() functions. This check is not needed as the manager must always be set if the output device was connected. Remove the check. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: convert dss_mgr_disable to accept omap_channelTomi Valkeinen1-1/+1
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_disable() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: convert dss_mgr_enable to accept omap_channelTomi Valkeinen1-1/+1
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_enable() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: convert dss_mgr_set_timings to accept omap_channelTomi Valkeinen1-1/+1
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_set_timings() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: convert dss_mgr_disconnect to accept omap_channelTomi Valkeinen1-2/+2
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_disconnect() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: convert dss_mgr_connect to accept omap_channelTomi Valkeinen1-1/+1
We are removing uses of 'struct omap_overlay_manager'. This patch changes dss_mgr_connect() to accept 'enum omap_channel' instead of 'struct omap_overlay_manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-03-03drm/omap: use dispc_channel_connected in output driversTomi Valkeinen1-1/+1
Use 'out->dispc_channel_connected' to check if the device is connected to an overlay manager or not, instead of using 'out->manager'. Signed-off-by: Tomi Valkeinen <[email protected]>
2016-01-18Merge tag 'fbdev-4.5' of ↵Linus Torvalds1-0/+1009
git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev updates from Tomi Valkeinen: "Summary: - pxafb: device-tree support - An unsafe kernel parameter 'lockless_register_fb' for debugging problems happening while inside the console lock - Small miscellaneous fixes & cleanups - omapdss: add writeback support functions - Separation of omapfb and omapdrm (see below) About the separation of omapfb and omapdrm, see http://permalink.gmane.org/gmane.comp.video.dri.devel/143151 for longer story. The short version: omapfb and omapdrm have shared low level drivers (omapdss and panel drivers), making further development of omapdrm difficult. After these patches omapfb and omapdrm have their own versions of the drivers, which are more or less direct copies for now but will diverge soon. This also means that omapfb (everything under drivers/video/fbdev/omap2/) is now in maintenance mode, and all new development will be done for omapdrm (drivers/gpu/drm/omapdrm/)" * tag 'fbdev-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (49 commits) video: fbdev: pxafb: fix out of memory error path drm/omap: make omapdrm select OMAP2_DSS drm/omap: move omapdss & displays under omapdrm omapfb: move vrfb into omapfb omapfb: take omapfb's private omapdss into use omapfb/displays: change CONFIG_DISPLAY_* to CONFIG_FB_OMAP2_* omapfb/dss: change CONFIG_OMAP* to CONFIG_FB_OMAP* omapdss: remove CONFIG_OMAP2_DSS_VENC from omapdss.h omapfb: copy omapdss & displays for omapfb omapfb: allow compilation only if DRM_OMAP is disabled fbdev: omap2: panel-dpi: simplify gpio setting fbdev: omap2: panel-dpi: in .disable first disable backlight then display OMAPDSS: DSS: fix a warning message video: omapdss: delete unneeded of_node_put OMAPDSS: DISPC: Remove boolean comparisons OMAPDSS: DSI: cleanup DSI_IRQ_ERROR_MASK define OMAPDSS: remove extra out == NULL checks OMAPDSS: change internal dispc functions to static OMAPDSS: make a two dss feat funcs internal to omapdss OMAPDSS: remove extra EXPORT_SYMBOLs ...
2015-12-29drm/omap: move omapdss & displays under omapdrmTomi Valkeinen1-0/+997
Now that omapfb has its own copy of omapdss and display drivers, we can move omapdss and display drivers which omapdrm uses to omapdrm's directory. We also need to change the main drm Makefile so that omapdrm directory is always entered, because omapdss has a file that can't be built as a module. Signed-off-by: Tomi Valkeinen <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Rob Clark <[email protected]>