Skip to content

Commit

Permalink
Merge tag 'omapdss-for-3.10' of git://gitorious.org/linux-omap-dss2/l…
Browse files Browse the repository at this point in the history
…inux into drm-next

Omapdss patches for 3.10 merge window

The biggest changes are:

* DSI video mode: automatic clock and timing calculation
* Lots of platform data related panel driver cleanups, to prepare for DT

* tag 'omapdss-for-3.10' of git://gitorious.org/linux-omap-dss2/linux: (69 commits)
  drm/omap: add statics to a few structs
  drm/omap: Fix and improve crtc and overlay manager correlation
  drm/omap: Take a fb reference in omap_plane_update()
  drm/omap: Make fixed resolution panels work
  drm/omap: fix modeset_init if a panel doesn't satisfy omapdrm requirements
  OMAPDSS: DPI: widen the pck search when using dss fck
  OMAPDSS: fix dss_fck clock rate rounding
  omapdss: use devm_clk_get()
  OMAPDSS: nec-nl8048 panel: Use dev_pm_ops
  OMAPDSS: DISPC: Revert to older DISPC Smart Standby mechanism for OMAP5
  OMAPDSS: DISPC: Configure doublestride for NV12 when using 2D Tiler buffers
  omapdss: Features: Fix some parameter ranges
  omapdss: DISPC: add max pixel clock limits for LCD and TV managers
  OMAPDSS: DSI: Use devm_clk_get()
  drivers: video: omap2: dss: Use PTR_RET function
  OMAPDSS: VENC: remove platform_enable/disable calls
  OMAPDSS: n8x0 panel: remove use of platform_enable/disable
  OMAPDSS: n8x0 panel: handle gpio data in panel driver
  OMAPDSS: picodlp panel: remove platform_enable/disable callbacks
  OMAPDSS: picodlp panel: handle gpio data in panel driver
  ...
  • Loading branch information
Dave Airlie committed Apr 16, 2013
2 parents e4fda9f + 3d62fe5 commit dea14df
Show file tree
Hide file tree
Showing 53 changed files with 1,972 additions and 1,739 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-2430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include "gpmc-smc91x.h"

#include <video/omapdss.h>
#include <video/omap-panel-generic-dpi.h>
#include <video/omap-panel-data.h>

#include "mux.h"
#include "hsmmc.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-3430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "common.h"
#include <linux/omap-dma.h>
#include <video/omapdss.h>
#include <video/omap-panel-tfp410.h>
#include <video/omap-panel-data.h>

#include "gpmc.h"
#include "gpmc-smc91x.h"
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/board-am3517evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@

#include "common.h"
#include <video/omapdss.h>
#include <video/omap-panel-generic-dpi.h>
#include <video/omap-panel-tfp410.h>
#include <video/omap-panel-data.h>

#include "am35xx-emac.h"
#include "mux.h"
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/board-cm-t35.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@

#include <linux/platform_data/mtd-nand-omap2.h>
#include <video/omapdss.h>
#include <video/omap-panel-generic-dpi.h>
#include <video/omap-panel-tfp410.h>
#include <video/omap-panel-data.h>
#include <linux/platform_data/spi-omap2-mcspi.h>

#include "common.h"
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/board-devkit8000.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
#include "gpmc.h"
#include <linux/platform_data/mtd-nand-omap2.h>
#include <video/omapdss.h>
#include <video/omap-panel-generic-dpi.h>
#include <video/omap-panel-tfp410.h>
#include <video/omap-panel-data.h>

#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/input/matrix_keypad.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <asm/mach/map.h>

#include <video/omapdss.h>
#include <video/omap-panel-generic-dpi.h>
#include <video/omap-panel-data.h>

#include "common.h"
#include "mux.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-igep0020.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <asm/mach/arch.h>

#include <video/omapdss.h>
#include <video/omap-panel-tfp410.h>
#include <video/omap-panel-data.h>
#include <linux/platform_data/mtd-onenand-omap2.h>

#include "common.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-ldp.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include "gpmc-smsc911x.h"

#include <video/omapdss.h>
#include <video/omap-panel-generic-dpi.h>
#include <video/omap-panel-data.h>

#include "board-flash.h"
#include "mux.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-omap3beagle.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include <asm/mach/flash.h>

#include <video/omapdss.h>
#include <video/omap-panel-tfp410.h>
#include <video/omap-panel-data.h>
#include <linux/platform_data/mtd-nand-omap2.h>

#include "common.h"
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/board-omap3evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#include "common.h"
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <video/omapdss.h>
#include <video/omap-panel-tfp410.h>
#include <video/omap-panel-data.h>

#include "soc.h"
#include "mux.h"
Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/board-omap3stalker.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
#include "gpmc.h"
#include <linux/platform_data/mtd-nand-omap2.h>
#include <video/omapdss.h>
#include <video/omap-panel-generic-dpi.h>
#include <video/omap-panel-tfp410.h>
#include <video/omap-panel-data.h>

#include <linux/platform_data/spi-omap2-mcspi.h>

Expand Down
3 changes: 1 addition & 2 deletions arch/arm/mach-omap2/board-overo.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
#include <asm/mach/map.h>

#include <video/omapdss.h>
#include <video/omap-panel-generic-dpi.h>
#include <video/omap-panel-tfp410.h>
#include <video/omap-panel-data.h>

#include "common.h"
#include "mux.h"
Expand Down
4 changes: 1 addition & 3 deletions arch/arm/mach-omap2/dss-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
#include <linux/gpio.h>

#include <video/omapdss.h>
#include <video/omap-panel-tfp410.h>
#include <video/omap-panel-nokia-dsi.h>
#include <video/omap-panel-picodlp.h>
#include <video/omap-panel-data.h>

#include "soc.h"
#include "dss-common.h"
Expand Down
27 changes: 25 additions & 2 deletions drivers/gpu/drm/omapdrm/omap_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ static enum drm_connector_status omap_connector_detect(
ret = connector_status_connected;
else
ret = connector_status_disconnected;
} else if (dssdev->type == OMAP_DISPLAY_TYPE_DPI ||
dssdev->type == OMAP_DISPLAY_TYPE_DBI ||
dssdev->type == OMAP_DISPLAY_TYPE_SDI ||
dssdev->type == OMAP_DISPLAY_TYPE_DSI) {
ret = connector_status_connected;
} else {
ret = connector_status_unknown;
}
Expand Down Expand Up @@ -189,12 +194,30 @@ static int omap_connector_mode_valid(struct drm_connector *connector,
struct omap_video_timings timings = {0};
struct drm_device *dev = connector->dev;
struct drm_display_mode *new_mode;
int ret = MODE_BAD;
int r, ret = MODE_BAD;

copy_timings_drm_to_omap(&timings, mode);
mode->vrefresh = drm_mode_vrefresh(mode);

if (!dssdrv->check_timings(dssdev, &timings)) {
/*
* if the panel driver doesn't have a check_timings, it's most likely
* a fixed resolution panel, check if the timings match with the
* panel's timings
*/
if (dssdrv->check_timings) {
r = dssdrv->check_timings(dssdev, &timings);
} else {
struct omap_video_timings t = {0};

dssdrv->get_timings(dssdev, &t);

if (memcmp(&timings, &t, sizeof(struct omap_video_timings)))
r = -EINVAL;
else
r = 0;
}

if (!r) {
/* check if vrefresh is still valid */
new_mode = drm_mode_duplicate(dev, mode);
new_mode->clock = timings.pixel_clock;
Expand Down
21 changes: 14 additions & 7 deletions drivers/gpu/drm/omapdrm/omap_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ struct omap_crtc {
struct work_struct page_flip_work;
};

uint32_t pipe2vbl(struct drm_crtc *crtc)
{
struct omap_crtc *omap_crtc = to_omap_crtc(crtc);

return dispc_mgr_get_vsync_irq(omap_crtc->channel);
}

/*
* Manager-ops, callbacks from output when they need to configure
* the upstream part of the video pipe.
Expand Down Expand Up @@ -613,20 +620,20 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
omap_crtc->apply.pre_apply = omap_crtc_pre_apply;
omap_crtc->apply.post_apply = omap_crtc_post_apply;

omap_crtc->apply_irq.irqmask = pipe2vbl(id);
omap_crtc->channel = channel;
omap_crtc->plane = plane;
omap_crtc->plane->crtc = crtc;
omap_crtc->name = channel_names[channel];
omap_crtc->pipe = id;

omap_crtc->apply_irq.irqmask = pipe2vbl(crtc);
omap_crtc->apply_irq.irq = omap_crtc_apply_irq;

omap_crtc->error_irq.irqmask =
dispc_mgr_get_sync_lost_irq(channel);
omap_crtc->error_irq.irq = omap_crtc_error_irq;
omap_irq_register(dev, &omap_crtc->error_irq);

omap_crtc->channel = channel;
omap_crtc->plane = plane;
omap_crtc->plane->crtc = crtc;
omap_crtc->name = channel_names[channel];
omap_crtc->pipe = id;

/* temporary: */
omap_crtc->mgr.id = channel;

Expand Down
Loading

0 comments on commit dea14df

Please sign in to comment.