summaryrefslogtreecommitdiffstats
path: root/drivers/video
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | OMAPDSS: HDMI: Add opsTomi Valkeinen2013-06-171-6/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "ops" style method for using HDMI functionality. Ops style calls will allow us to have arbitrarily long display pipelines, where each entity can call ops in the previous display entity. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: AnalogTV: Add opsTomi Valkeinen2013-06-171-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "ops" style method for using analog TV functionality. Ops style calls will allow us to have arbitrarily long display pipelines, where each entity can call ops in the previous display entity. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: SDI: Add opsTomi Valkeinen2013-06-171-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "ops" style method for using SDI functionality. Ops style calls will allow us to have arbitrarily long display pipelines, where each entity can call ops in the previous display entity. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DPI: Add opsTomi Valkeinen2013-06-171-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "ops" style method for using DPI functionality. Ops style calls will allow us to have arbitrarily long display pipelines, where each entity can call ops in the previous display entity. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add OMAP_DISPLAY_TYPE_DVITomi Valkeinen2013-06-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new display bus type for DVI. This is not used by omapdss driver itself, but is used by external encoder chips that output DVI. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: modify get/find functions to go through the device chainTomi Valkeinen2013-06-172-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the future will have arbitrarily long video pipeline chains, instead of the current two-entities-per-pipeline model. This patch changes the affected get/find style functions so that they properly go through the video pipeline chain, for example when getting the overlay manager connected to a given display. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: public omapdss_register_output()Tomi Valkeinen2013-06-178-18/+17Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to allow multiple display block in a video pipeline, we need to give the drivers way to register themselves. For now we have the omapdss_register_display() which is used to register panels, and dss_register_output() which is used to register DSS encoders. This patch makes dss_register_output() public (with the name of omapdss_register_output), which can be used to register also external encoders. The distinction between register_output and register_display is that a "display" is an entity at the end of the videopipeline, and "output" is something inside the pipeline. The registration and naming will be made saner in the future, but the current names and functions are kept to minimize changes during the dss device model transition. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| * | | | | Merge tag 'omapdss-for-3.11-1' of git://gitorious.org/linux-omap-dss2/linux ↵Jean-Christophe PLAGNIOL-VILLARD2013-06-2835-841/+1002
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into fbdev/for-next OMAP display subsystem changes for 3.11 (part 1/2) This is the first part of OMAP DSS changes for 3.11. This part contains fixes, cleanups and reorganizations that are not directly related to the new DSS device model that is added in part 2, although many of the reorganizations are made to make the part 2 possible. There should not be any functional changes visible to the user except the few bug fixes. The main new internal features: - Display (dis)connect support, which allows us to explicitly (dis)connect a whole display pipeline - Panel list, which allows us to operate without the specific DSS bus - Combine omap_dss_output to omap_dss_device, so that we have one generic "entity" for display pipeline blocks
| | * | | | OMAPDSS: gracefully disable overlay at errorSergey Kibrik2013-06-171-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable overlay via ovl->disable() interface, which will properly set flags in cache and GO bits for managers. This allows overlay user to re-enable it on next frame, thus recovering from FIFO underflows. Signed-off-by: Sergey Kibrik <sergiikibrik@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: Remove kfree for memory allocated with devm_kzallocEmil Goode2013-06-171-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's not necessary to free memory allocated with devm_kzalloc in a remove function and using kfree leads to a double free. Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: remove dispc's dependency to VENC/HDMITomi Valkeinen2013-06-174-43/+12Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DISPC needs to know the clock rate for DIGIT (i.e. TV) channel, and this clock is provided by either VENC or HDMI modules. Currently DISPC will call a function in VENC/HDMI, asking what the clock rate is. This means we have a fixed dependency from DISPC to both VENC and HDMI. To have a more generic approach, and in particular to allow adding OMAP5 HDMI driver, we need to remove this dependency. This patch makes VENC/HDMI inform DISPC when the their clock changes, thus reversing the dependency and removing the issue. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: HDMI clean up hpd_gpioTomi Valkeinen2013-06-174-16/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hpd_gpio is no longer used by the OMAP4 HDMI IP driver, and we can thus remove the unnecessary code. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: HDMI: clean up PHY power handlingTomi Valkeinen2013-06-174-38/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TRM tells to set PHY to TXON only after getting LINK_CONNECT, and to set PHY to OFF or LDOON after getting LINK_DISCONNECT, in order to avoid damage to the PHY. We don't currently do it quite like that. Instead of using the HDMI interrupts, we use HPD signal. This works, but is not actually quite correct, as HPD comes at a different time than LINK_CONNECT and LINK_DISCONNECT interrupts. Also, the HPD GPIO is a property of the TPD level shifter, not HDMI IP, so handling the GPIO in the HDMI driver is wrong. This patch implements the PHY power handling correctly, using the interrupts. There is a corner case that causes some additional difficulties: we may get both LINK_CONNECT and LINK_DISCONNECT interrupts at the same time. This is handled in the code by retrying: turning off the PHY, clearing the interrupt status, and re-enabling the PHY. This causes a new LINK_CONNECT interrupt to happen if a cable is connected. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPFB: use EPROBE_DEFER if default display is not presentTomi Valkeinen2013-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently omapfb returns EPROBE_DEFER if no displays have been probed at the time omapfb is probed. However, sometimes some of the displays have been probed at that time, but not all. We can't return EPROBE_DEFER in that case, because then one missing driver would cause omapfb to defer always, preventing any display from working. However, if the user has defined a default display, we can presume that the driver for that display is eventually loaded. Thus, this patch changes omapfb to return EPROBE_DEFER in case default display is not found. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: output: increase refcount in find_output funcsTomi Valkeinen2013-06-171-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that omap_dss_output has been combined into omap_dss_device, we can add ref counting for the relevant output functions also. This patch adds omap_dss_get_device() calls to the various find_output() style functions. This, of course, means that the users of those find_output functions need to do a omap_dss_put_device() after use. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add THIS_MODULE owner to DSS outputsTomi Valkeinen2013-06-176-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setup the owner field for DSS output's omap_dss_device so that module refcounting works. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add module_get/put to omap_dss_get/put_device()Tomi Valkeinen2013-06-171-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omap_dss_get_device() should be called for omap_dss_device before it is used to increase its refcount. Currently we only increase the refcount for the underlying device. This patch adds managing the ref count to the underlying module also, which contains the ops for the omap_dss_device. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: combine omap_dss_output into omap_dss_deviceTomi Valkeinen2013-06-1710-63/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently have omap_dss_device, which represents an external display device, sometimes an external encoder, sometimes a panel. Then we have omap_dss_output, which represents DSS's output encoder. In the future with new display device model, we construct a video pipeline from the display blocks. To accomplish this, all the blocks need to be presented by the same entity. Thus, this patch combines omap_dss_output into omap_dss_device. Some of the fields in omap_dss_output are already found in omap_dss_device, but some are not. This means we'll have DSS output specific fields in omap_dss_device, which is not very nice. However, it is easier to just keep those output specific fields there for now, and after transition to new display device model is made, they can be cleaned up easier than could be done now. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: remove omap_dss_start/stop_device()Tomi Valkeinen2013-06-177-81/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The omap_dss_start_device() and omap_dss_stop_device(), called by the DSS output drivers, are old relics. They originally did something totally else, but nowadays they increase the module ref count for panels that are enabled. This model is quite broken: the panel modules may be used even before they are enabled. For example, configuring the panel requires calls to functions located in the panel modules. In the following patches we try to improve the ref count management for the modules and display devices. The first step, however, is to remove the omap_dss_start/stop_device() totally. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: Add panel dev pointer to dssdevTomi Valkeinen2013-06-1714-204/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are about to remove the dss bus support, which also means that the omap_dss_device won't be a real device anymore. This means that the embedded "dev" struct needs to be removed from omap_dss_device. After we've finished the removal of the dss bus, we see the following changes: - struct omap_dss_device won't be a real Linux device anymore, but more like a "display entity". - struct omap_dss_driver won't be a Linux device driver, but "display entity ops". - The panel devices/drivers won't be omapdss devices/drivers, but platform/i2c/spi/etc devices/drivers, whichever fits the control mechanism of the panel. - The panel drivers will create omap_dss_device and omap_dss_driver, fill the required fields, and register the omap_dss_device to omapdss. - omap_dss_device won't have an embedded dev struct anymore, but a dev pointer to the actual device that manages the omap_dss_device. The model described above resembles the model that has been discussed with CDF (common display framework). For the duration of the conversion, we temporarily have two devs in the dssdev, the old "old_dev", which is a full embedded device struct, and the new "dev", which is a pointer to the device. "old_dev" will be removed in the future. For devices belonging to dss bus the dev is initialized to point to old_dev. This way all the code can just use the dev, for both old and new style panels. Both the new and old style panel drivers work during the conversion, and only after the dss bus support is removed will the old style panels stop to compile. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: implement display sysfs without dss busTomi Valkeinen2013-06-174-95/+79Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We aim to remove the custom omapdss bus totally, as it's quite a strange construct and won't be compatible with common display framework. One problem on the road is that we have sysfs files for each display, and they depend on the omapdss bus. This patch creates the display sysfs files independent of the omapdss bus. This gives us backwards compatibility without using the omapdss bus for the sysfs files. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: don't use dss bus in suspend/resumeTomi Valkeinen2013-06-171-49/+28Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have support functions to suspend and resume all the displays that are used with system suspend. These functions use the dss bus to iterate the display devices. As we aim to remove the custom dss bus totally, this patch removes the explicit use of dss bus from these functions. Instead the for_each_dss_dev() macro is used to go through the devices. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: use the panel list in omap_dss_get_next_deviceTomi Valkeinen2013-06-171-15/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omap_dss_get_next_device() uses the dss bus to iterate over the displays. This patch changes omap_dss_get_next_device() to use the new panel list instead. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add panel listTomi Valkeinen2013-06-172-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use the omapdss bus (which contains all the available displays) to iterate the displays. As the omapdss bus is on its way out, this needs to be changed. Instead of using the dss bus to iterate displays, this patch adds our own list of displays which we manage. The panels on the dss bus are automatically added to this new list. An "alias" field is also added to omap_dss_device. This field is set to "display%d", the same way as omap_dss_device's dev name is set. This alias is later used to keep backward compatibility, when the embedded dev is no longer used. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: remove dssdev uses in trivial casesTomi Valkeinen2013-06-174-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the future the "dssdev" parameter passed to output drivers will change its meaning. Instead of being a pointer to the panel device, it's a pointer to the output instance. To make the transition easier, some of the uses for this dssdev parameter can be easily removed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add videomode conversion supportTomi Valkeinen2013-06-172-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helper functions to convert between omapdss specific video timings and the common videomode. Eventually omapdss will be changed to use only the common video timings, and these helper functions will make the transition easier. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: VENC: clean up regulator initTomi Valkeinen2013-06-171-23/+14Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up the VENC driver's regulator init to remove the (unused) omap_dss_device parameter, renaming the function to a more sensible name, and making the code slightly clearer. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: SDI: fix regulators for DTTomi Valkeinen2013-06-171-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SDI requires a regulator to operate. This regulator is, for some reason, currently attached to the virtual omapdss device, instead of the SDI device. This does not work for DT, as the regulator mappings need to be described in the DT data, and the virtual omapdss device is not present there. Fix the issue by acquiring the regulator in the SDI device. To retain compatibility with the current board files, the old method of getting the regulator is kept. The old method can be removed when the board files have been changed to pass the regulator to SDI. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: SDI: clean up regulator initTomi Valkeinen2013-06-171-12/+11Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up the SDI driver's regulator init to remove the (unused) omap_dss_device parameter, renaming the function to a more sensible name, and making the code slightly clearer. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: HDMI: add hdmi_init_regulatorTomi Valkeinen2013-06-171-16/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate regulator init code into its own function for clarity. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DPI: fix regulators for DTTomi Valkeinen2013-06-171-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some platforms DPI requires a regulator to be enabled to power up the output pins. This regulator is, for some reason, currently attached to the virtual omapdss device, instead of the DPI device. This does not work for DT, as the regulator mappings need to be described in the DT data, and the virtual omapdss device is not present there. Fix the issue by acquiring the regulator in the DPI device. To retain compatibility with the current board files, the old method of getting the regulator is kept. The old method can be removed when the board files have been changed to pass the regulator to DPI. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DPI: cleanup pll & regulator initTomi Valkeinen2013-06-171-42/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split regulator and DSI PLL init code to their own functions for clarity. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: DSI: cleanup regulator initTomi Valkeinen2013-06-171-59/+34Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate the regulator initialization code to its own function, removing duplicate code. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: CORE: use devm_regulator_getTomi Valkeinen2013-06-171-12/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use devm_regulator_get() instead of regulator_get() to simplify code. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: Implement display (dis)connect supportTomi Valkeinen2013-06-176-40/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently have two steps in panel initialization and startup: probing and enabling. After the panel has been probed, it's ready and can be configured and later enabled. This model is not enough with more complex display pipelines, where we may have, for example, two panels, of which only one can be used at a time, connected to the same video output. To support that kind of scenarios, we need to add new step to the initialization: connect. This patch adds support for connecting and disconnecting panels. After probe, but before connect, no panel ops should be called. When the connect is called, a proper video pipeline is established, and the panel is ready for use. If some part in the video pipeline is already connected (by some other panel), the connect call fails. One key difference with the old style setup is that connect() handles also connecting to the overlay manager. This means that the omapfb (or omapdrm) no longer needs to figure out which overlay manager to use, but it can just call connect() on the panel, and the proper overlay manager is connected by omapdss. This also allows us to add back the support for dynamic switching between two exclusive panels. However, the current panel device model is not changed to support this, as the new device model is implemented in the following patches and the old model will be removed. The new device model supports dynamic switching. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDRM: fix overlay manager handlingTomi Valkeinen2013-06-172-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently omapdrm creates crtcs, which map directly to DSS overlay managers, only on demand at init time. This would make it difficult to manage connecting the display entities in the future, as the code cannot just search for a suitable overlay manager. We cannot fix this the sane way, which would be to create crtcs for each overlay manager, because we need an overlay for each crtc. With limited number of overlays, that's not possible. So the solution for now is to detach the overlay manager from the crtc. crtcs are still created on demand at init time, but all overlay managers are always initialized by the omapdss. This way we can create and connect whole display pipelines from the overlay manager to the display, regardless of which crtcs omapdrm would create. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: split overlay manager creationTomi Valkeinen2013-06-174-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the function that creates overlay manager structs into two: one that creates just the structs, and one that creates the sysfs files for the manager. This will help us use the overlay manager structs with omapdrm in the following patches, while still leaving the sysfs files out. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add helpers to get mgr or output from displayTomi Valkeinen2013-06-174-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two helper functions that can be used to find either the DSS output or the overlay manager that is connected to the given display. This hides how the output and the manager are actually connected, making it easier to change the connections in the future. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: clean up dss_[ovl|mgr]_get_device()Tomi Valkeinen2013-06-171-6/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor cleanup for the dss_[ovl|mgr]_get_device() functions to make them more readable. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: fix dss_get_ctx_loss_count for DTTomi Valkeinen2013-06-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using DT, dss device does not have platform data. However, dss_get_ctx_loss_count() uses dss device's platform data to find the get_ctx_loss_count function pointer. To fix this, dss_get_ctx_loss_count() needs to be changed to get the platform data from the omapdss device, which is a "virtual" device and always has platform data. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add omap_dss_find_output_by_node()Tomi Valkeinen2013-06-171-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a support function to find a DSS output by given DT node. This is used in later patches to link the panels to DSS outputs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add omap_dss_find_output()Tomi Valkeinen2013-06-171-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a support function to find a DSS output by given name. This is used in later patches to link the panels to DSS outputs. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: only probe pdata if there's oneTomi Valkeinen2013-06-176-31/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | omapdss output drivers always read the platform data. This crashes when there's no platform data when using DT. Add a check to read the platform data only if it exists. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
| | * | | | OMAPDSS: add pdata->default_display_nameTomi Valkeinen2013-06-171-0/+2
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can currently set the default display (i.e. the initial display) in the omapdss platform data by using a pointer to the default omap_dss_device. Internally omapdss uses the device's name to resolve the default display. As it's difficult to get the omap_dss_device pointer in the future, after we've changed the omapdss device model, this patch adds a new way to define the default display, by using the name of the display. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
| * | | | fb: make fp_get_options name argument constVincent Stehlé2013-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm_get_connector_name now returns a const value, which causes the following compilation warning: drivers/gpu/drm/drm_fb_helper.c: In function ‘drm_fb_helper_parse_command_line’: drivers/gpu/drm/drm_fb_helper.c:127:3: warning: passing argument 1 of ‘fb_get_options’ discards ‘const’ qualifier from pointer target type [enabled by default] In file included from drivers/gpu/drm/drm_fb_helper.c:35:0: include/linux/fb.h:627:12: note: expected ‘char *’ but argument is of type ‘const char *’ As fb_get_options uses its name argument as read only, make it const. This fixes the aforementioned compilation warning. Signed-off-by: Vincent Stehlé <vincent.stehle@freescale.com> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Dave Airlie <airlied@redhat.com> Cc: trivial@kernel.org Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * | | | video: mmp: fix graphics/video layer enable/mask swap issueJing Xiang2013-06-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is bug when switch dma of graphic layer and video layer, it configured opposite bit, fix it. Signed-off-by: Jing Xiang <jxiang@marvell.com> Signed-off-by: Jett.Zhou <jtzhou@marvell.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * | | | video: mmp: fix memcpy wrong size for mmp_addr issueJing Xiang2013-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Memcpy used wrong struct of mmp_win, fix it. Signed-off-by: Jing Xiang <jxiang@marvell.com> Signed-off-by: Jett.Zhou <jtzhou@marvell.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * | | | Merge branch 'fbdev-3.11' of git://gitorious.org/linux-omap-dss2/linux into ↵Jean-Christophe PLAGNIOL-VILLARD2013-06-142-117/+330
| |\ \ \ \ | | |/ / / | |/| / / | | |/ / fbdev/for-next
| | * | videomode: implement public of_get_display_timing()Tomi Valkeinen2013-05-281-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current of_get_display_timings() reads multiple display timings, allocating memory for the entries. However, most of the time when parsing display timings from DT data is needed, there's only one display timing as it's not common for a LCD panel to support multiple videomodes. This patch creates a new function: int of_get_display_timing(struct device_node *np, const char *name, struct display_timing *dt); which can be used to parse a single display timing entry from the given node name. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Philipp Zabel <p.zabel@pengutronix.de>
| | * | videomode: don't allocate mem in of_get_display_timing()Tomi Valkeinen2013-05-281-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the allocation of display_timing memory from of_get_display_timing() to of_get_display_timings(). This allows us to use of_get_display_timing() in a way that doesn't require dynamic memory allocation. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Philipp Zabel <p.zabel@pengutronix.de>