diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-07 20:36:12 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-07 20:36:12 -0400 |
| commit | a7d7a143d0b4cb1914705884ca5c25e322dba693 (patch) | |
| tree | 0ee5e9e43f0863b38a29e8abc293e80eab177d74 /drivers/gpu/drm/armada | |
| parent | 43c40df2c7fedce640a6c39fcdf58764f6bbac5c (diff) | |
| parent | 7963e9db1b1f842fdc53309baa8714d38e9f5681 (diff) | |
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull DRM updates from Dave Airlie:
"Like all good pull reqs this ends with a revert, so it must mean we
tested it,
[ Ed. That's _one_ way of looking at it ]
This pull is missing nouveau, Ben has been stuck trying to track down
a very longstanding bug that revealed itself due to some other
changes. I've asked him to send you a direct pull request for nouveau
once he cleans things up. I'm away until Monday so don't want to
delay things, you can make a decision on that when he sends it, I have
my phone so I can ack things just not really merge much.
It has one trivial conflict with your tree in armada_drv.c, and also
the pull request contains some component changes that are already in
your tree, the base tree from Russell went via Greg's tree already,
but some stuff still shows up in here that doesn't when I merge my
tree into yours.
Otherwise all pretty standard graphics fare, one new driver and
changes all over the place.
New drivers:
- sti kms driver for STMicroelectronics chipsets stih416 and stih407.
core:
- lots of cleanups to the drm core
- DP MST helper code merged
- universal cursor planes.
- render nodes enabled by default
panel:
- better panel interfaces
- new panel support
- non-continuous cock advertising ability
ttm:
- shrinker fixes
i915:
- hopefully ditched UMS support
- runtime pm fixes
- psr tracking and locking - now enabled by default
- userptr fixes
- backlight brightness fixes
- MST support merged
- runtime PM for dpms
- primary planes locking fixes
- gen8 hw semaphore support
- fbc fixes
- runtime PM on SOix sleep state hw.
- mmio base page flipping
- lots of vlv/chv fixes.
- universal cursor planes
radeon:
- Hawaii fixes
- display scalar support for non-fixed mode displays
- new firmware format support
- dpm on more asics by default
- GPUVM improvements
- uncached and wc GTT buffers
- BOs > visible VRAM
exynos:
- i80 interface support
- module auto-loading
- ipp driver consolidated.
armada:
- irq handling in crtc layer only
- crtc renumbering
- add component support
- DT interaction changes.
tegra:
- load as module fixes
- eDP bpp and sync polarity fixed
- DSI non-continuous clock mode support
- better support for importing buffers from nouveau
msm:
- mdp5/adq8084 v1.3 hw enablement
- devicetree clk changse
- ifc6410 board working
tda998x:
- component support
- DT documentation update
vmwgfx:
- fix compat shader namespace"
* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (551 commits)
Revert "drm: drop redundant drm_file->is_master"
drm/panel: simple: Use devm_gpiod_get_optional()
drm/dsi: Replace upcasting macro by function
drm/panel: ld9040: Replace upcasting macro by function
drm/exynos: dp: Modify driver to support drm_panel
drm/exynos: Move DP setup into commit()
drm/panel: simple: Add AUO B133HTN01 panel support
drm/panel: simple: Support delays in panel functions
drm/panel: simple: Add proper definition for prepare and unprepare
drm/panel: s6e8aa0: Add proper definition for prepare and unprepare
drm/panel: ld9040: Add proper definition for prepare and unprepare
drm/tegra: Add support for panel prepare and unprepare routines
drm/exynos: dsi: Add support for panel prepare and unprepare routines
drm/exynos: dpi: Add support for panel prepare and unprepare routines
drm/panel: simple: Add dummy prepare and unprepare routines
drm/panel: s6e8aa0: Add dummy prepare and unprepare routines
drm/panel: ld9040: Add dummy prepare and unprepare routines
drm/panel: Provide convenience wrapper for .get_modes()
drm/panel: add .prepare() and .unprepare() functions
drm/panel: simple: Remove simple-panel compatible
...
Diffstat (limited to 'drivers/gpu/drm/armada')
| -rw-r--r-- | drivers/gpu/drm/armada/armada_510.c | 23 | ||||
| -rw-r--r-- | drivers/gpu/drm/armada/armada_crtc.c | 187 | ||||
| -rw-r--r-- | drivers/gpu/drm/armada/armada_crtc.h | 11 | ||||
| -rw-r--r-- | drivers/gpu/drm/armada/armada_drm.h | 13 | ||||
| -rw-r--r-- | drivers/gpu/drm/armada/armada_drv.c | 245 | ||||
| -rw-r--r-- | drivers/gpu/drm/armada/armada_fbdev.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/armada/armada_output.c | 4 |
7 files changed, 364 insertions, 123 deletions
diff --git a/drivers/gpu/drm/armada/armada_510.c b/drivers/gpu/drm/armada/armada_510.c index 59948eff6095..ad3d2ebf95c9 100644 --- a/drivers/gpu/drm/armada/armada_510.c +++ b/drivers/gpu/drm/armada/armada_510.c | |||
| @@ -15,20 +15,19 @@ | |||
| 15 | #include "armada_drm.h" | 15 | #include "armada_drm.h" |
| 16 | #include "armada_hw.h" | 16 | #include "armada_hw.h" |
| 17 | 17 | ||
| 18 | static int armada510_init(struct armada_private *priv, struct device *dev) | 18 | static int armada510_crtc_init(struct armada_crtc *dcrtc, struct device *dev) |
| 19 | { | 19 | { |
| 20 | priv->extclk[0] = devm_clk_get(dev, "ext_ref_clk_1"); | 20 | struct clk *clk; |
| 21 | 21 | ||
| 22 | if (IS_ERR(priv->extclk[0]) && PTR_ERR(priv->extclk[0]) == -ENOENT) | 22 | clk = devm_clk_get(dev, "ext_ref_clk1"); |
| 23 | priv->extclk[0] = ERR_PTR(-EPROBE_DEFER); | 23 | if (IS_ERR(clk)) |
| 24 | return PTR_ERR(clk) == -ENOENT ? -EPROBE_DEFER : PTR_ERR(clk); | ||
| 24 | 25 | ||
| 25 | return PTR_RET(priv->extclk[0]); | 26 | dcrtc->extclk[0] = clk; |
| 26 | } | ||
| 27 | 27 | ||
| 28 | static int armada510_crtc_init(struct armada_crtc *dcrtc) | ||
| 29 | { | ||
| 30 | /* Lower the watermark so to eliminate jitter at higher bandwidths */ | 28 | /* Lower the watermark so to eliminate jitter at higher bandwidths */ |
| 31 | armada_updatel(0x20, (1 << 11) | 0xff, dcrtc->base + LCD_CFG_RDREG4F); | 29 | armada_updatel(0x20, (1 << 11) | 0xff, dcrtc->base + LCD_CFG_RDREG4F); |
| 30 | |||
| 32 | return 0; | 31 | return 0; |
| 33 | } | 32 | } |
| 34 | 33 | ||
| @@ -45,8 +44,7 @@ static int armada510_crtc_init(struct armada_crtc *dcrtc) | |||
| 45 | static int armada510_crtc_compute_clock(struct armada_crtc *dcrtc, | 44 | static int armada510_crtc_compute_clock(struct armada_crtc *dcrtc, |
| 46 | const struct drm_display_mode *mode, uint32_t *sclk) | 45 | const struct drm_display_mode *mode, uint32_t *sclk) |
| 47 | { | 46 | { |
| 48 | struct armada_private *priv = dcrtc->crtc.dev->dev_private; | 47 | struct clk *clk = dcrtc->extclk[0]; |
| 49 | struct clk *clk = priv->extclk[0]; | ||
| 50 | int ret; | 48 | int ret; |
| 51 | 49 | ||
| 52 | if (dcrtc->num == 1) | 50 | if (dcrtc->num == 1) |
| @@ -81,7 +79,6 @@ static int armada510_crtc_compute_clock(struct armada_crtc *dcrtc, | |||
| 81 | const struct armada_variant armada510_ops = { | 79 | const struct armada_variant armada510_ops = { |
| 82 | .has_spu_adv_reg = true, | 80 | .has_spu_adv_reg = true, |
| 83 | .spu_adv_reg = ADV_HWC32ENABLE | ADV_HWC32ARGB | ADV_HWC32BLEND, | 81 | .spu_adv_reg = ADV_HWC32ENABLE | ADV_HWC32ARGB | ADV_HWC32BLEND, |
| 84 | .init = armada510_init, | 82 | .init = armada510_crtc_init, |
| 85 | .crtc_init = armada510_crtc_init, | 83 | .compute_clock = armada510_crtc_compute_clock, |
| 86 | .crtc_compute_clock = armada510_crtc_compute_clock, | ||
| 87 | }; | 84 | }; |
diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c index 3aedf9e993e6..9a0cc09e6653 100644 --- a/drivers/gpu/drm/armada/armada_crtc.c +++ b/drivers/gpu/drm/armada/armada_crtc.c | |||
| @@ -7,6 +7,9 @@ | |||
| 7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
| 8 | */ | 8 | */ |
| 9 | #include <linux/clk.h> | 9 | #include <linux/clk.h> |
| 10 | #include <linux/component.h> | ||
| 11 | #include <linux/of_device.h> | ||
| 12 | #include <linux/platform_device.h> | ||
| 10 | #include <drm/drmP.h> | 13 | #include <drm/drmP.h> |
| 11 | #include <drm/drm_crtc_helper.h> | 14 | #include <drm/drm_crtc_helper.h> |
| 12 | #include "armada_crtc.h" | 15 | #include "armada_crtc.h" |
| @@ -332,24 +335,23 @@ static void armada_drm_crtc_commit(struct drm_crtc *crtc) | |||
| 332 | static bool armada_drm_crtc_mode_fixup(struct drm_crtc *crtc, | 335 | static bool armada_drm_crtc_mode_fixup(struct drm_crtc *crtc, |
| 333 | const struct drm_display_mode *mode, struct drm_display_mode *adj) | 336 | const struct drm_display_mode *mode, struct drm_display_mode *adj) |
| 334 | { | 337 | { |
| 335 | struct armada_private *priv = crtc->dev->dev_private; | ||
| 336 | struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc); | 338 | struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc); |
| 337 | int ret; | 339 | int ret; |
| 338 | 340 | ||
| 339 | /* We can't do interlaced modes if we don't have the SPU_ADV_REG */ | 341 | /* We can't do interlaced modes if we don't have the SPU_ADV_REG */ |
| 340 | if (!priv->variant->has_spu_adv_reg && | 342 | if (!dcrtc->variant->has_spu_adv_reg && |
| 341 | adj->flags & DRM_MODE_FLAG_INTERLACE) | 343 | adj->flags & DRM_MODE_FLAG_INTERLACE) |
| 342 | return false; | 344 | return false; |
| 343 | 345 | ||
| 344 | /* Check whether the display mode is possible */ | 346 | /* Check whether the display mode is possible */ |
| 345 | ret = priv->variant->crtc_compute_clock(dcrtc, adj, NULL); | 347 | ret = dcrtc->variant->compute_clock(dcrtc, adj, NULL); |
| 346 | if (ret) | 348 | if (ret) |
| 347 | return false; | 349 | return false; |
| 348 | 350 | ||
| 349 | return true; | 351 | return true; |
| 350 | } | 352 | } |
| 351 | 353 | ||
| 352 | void armada_drm_crtc_irq(struct armada_crtc *dcrtc, u32 stat) | 354 | static void armada_drm_crtc_irq(struct armada_crtc *dcrtc, u32 stat) |
| 353 | { | 355 | { |
| 354 | struct armada_vbl_event *e, *n; | 356 | struct armada_vbl_event *e, *n; |
| 355 | void __iomem *base = dcrtc->base; | 357 | void __iomem *base = dcrtc->base; |
| @@ -410,6 +412,27 @@ void armada_drm_crtc_irq(struct armada_crtc *dcrtc, u32 stat) | |||
| 410 | } | 412 | } |
| 411 | } | 413 | } |
| 412 | 414 | ||
| 415 | static irqreturn_t armada_drm_irq(int irq, void *arg) | ||
| 416 | { | ||
| 417 | struct armada_crtc *dcrtc = arg; | ||
| 418 | u32 v, stat = readl_relaxed(dcrtc->base + LCD_SPU_IRQ_ISR); | ||
| 419 | |||
| 420 | /* | ||
| 421 | * This is rediculous - rather than writing bits to clear, we | ||
| 422 | * have to set the actual status register value. This is racy. | ||
| 423 | */ | ||
| 424 | writel_relaxed(0, dcrtc->base + LCD_SPU_IRQ_ISR); | ||
| 425 | |||
| 426 | /* Mask out those interrupts we haven't enabled */ | ||
| 427 | v = stat & dcrtc->irq_ena; | ||
| 428 | |||
| 429 | if (v & (VSYNC_IRQ|GRA_FRAME_IRQ|DUMB_FRAMEDONE)) { | ||
| 430 | armada_drm_crtc_irq(dcrtc, stat); | ||
| 431 | return IRQ_HANDLED; | ||
| 432 | } | ||
| 433 | return IRQ_NONE; | ||
| 434 | } | ||
| 435 | |||
| 413 | /* These are locked by dev->vbl_lock */ | 436 | /* These are locked by dev->vbl_lock */ |
| 414 | void armada_drm_crtc_disable_irq(struct armada_crtc *dcrtc, u32 mask) | 437 | void armada_drm_crtc_disable_irq(struct armada_crtc *dcrtc, u32 mask) |
| 415 | { | 438 | { |
| @@ -470,7 +493,6 @@ static int armada_drm_crtc_mode_set(struct drm_crtc *crtc, | |||
| 470 | struct drm_display_mode *mode, struct drm_display_mode *adj, | 493 | struct drm_display_mode *mode, struct drm_display_mode *adj, |
| 471 | int x, int y, struct drm_framebuffer *old_fb) | 494 | int x, int y, struct drm_framebuffer *old_fb) |
| 472 | { | 495 | { |
| 473 | struct armada_private *priv = crtc->dev->dev_private; | ||
| 474 | struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc); | 496 | struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc); |
| 475 | struct armada_regs regs[17]; | 497 | struct armada_regs regs[17]; |
| 476 | uint32_t lm, rm, tm, bm, val, sclk; | 498 | uint32_t lm, rm, tm, bm, val, sclk; |
| @@ -515,7 +537,7 @@ static int armada_drm_crtc_mode_set(struct drm_crtc *crtc, | |||
| 515 | } | 537 | } |
| 516 | 538 | ||
| 517 | /* Now compute the divider for real */ | 539 | /* Now compute the divider for real */ |
| 518 | priv->variant->crtc_compute_clock(dcrtc, adj, &sclk); | 540 | dcrtc->variant->compute_clock(dcrtc, adj, &sclk); |
| 519 | |||
