Commit bcd21a47 authored by Dave Airlie's avatar Dave Airlie

Merge branch 'drm-armada-devel-4.15' of git://git.armlinux.org.uk/~rmk/linux-arm into drm-next

This series builds upon the set of fixes previously submitted to move
Armada DRM closer to atomic modeset.  We're nowhere near yet, but this
series helps to get us closer by unifying some of the differences
between the primary and overlay planes.

New features added allows userspace to disable the primary plane if
overlay is full screen and there's nothing obscuring the colorkey -
this saves having to fetch an entire buffer containing nothing but
colorkey when displaying full screen video.

[airlied: fixup for atomic plane helper rename:
a01cb8ba
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Wed Nov 1 22:16:19 2017 +0200

    drm: Move drm_plane_helper_check_state() into drm_atomic_helper.c
]

* 'drm-armada-devel-4.15' of git://git.armlinux.org.uk/~rmk/linux-arm: (29 commits)
  drm/armada: expand overlay trace entry
  drm/armada: implement primary plane update
  drm/armada: extract register generation from armada_drm_primary_set()
  drm/armada: wait for previous work when moving overlay window
  drm/armada: move overlay plane register update generation
  drm/armada: re-organise overlay register update generation
  drm/armada: disable planes at next blanking period
  drm/armada: avoid work allocation
  drm/armada: allow armada_drm_plane_work_queue() to silently fail
  drm/armada: use drm_plane_helper_check_state()
  drm/armada: only enable HSMOOTH if scaling horizontally
  drm/armada: move writes of LCD_SPU_SRAM_PARA1 under lock
  drm/armada: move regs into armada_plane_work
  drm/armada: move event sending into armada_plane_work
  drm/armada: move fb retirement into armada_plane_work
  drm/armada: move overlay plane work out from under spinlock
  drm/armada: clear plane enable bit when disabling
  drm/armada: clean up armada_drm_crtc_plane_disable()
  drm/armada: allow the primary plane to be disabled
  drm/armada: wait and cancel any pending frame work at disable
  ...
parents 066f9eb4 27ab688f
This diff is collapsed.
......@@ -36,21 +36,31 @@ struct armada_plane;
struct armada_variant;
struct armada_plane_work {
void (*fn)(struct armada_crtc *,
struct armada_plane *,
struct armada_plane_work *);
void (*fn)(struct armada_crtc *, struct armada_plane_work *);
void (*cancel)(struct armada_crtc *, struct armada_plane_work *);
bool need_kfree;
struct drm_plane *plane;
struct drm_framebuffer *old_fb;
struct drm_pending_vblank_event *event;
struct armada_regs regs[14];
};
struct armada_plane_state {
u16 src_x;
u16 src_y;
u32 src_hw;
u32 dst_hw;
u32 dst_yx;
u32 ctrl0;
bool changed;
bool vsync_update;
};
struct armada_plane {
struct drm_plane base;
wait_queue_head_t frame_wait;
bool next_work;
struct armada_plane_work works[2];
struct armada_plane_work *work;
struct armada_plane_state state;
};
......@@ -58,10 +68,10 @@ struct armada_plane {
int armada_drm_plane_init(struct armada_plane *plane);
int armada_drm_plane_work_queue(struct armada_crtc *dcrtc,
struct armada_plane *plane, struct armada_plane_work *work);
struct armada_plane_work *work);
int armada_drm_plane_work_wait(struct armada_plane *plane, long timeout);
struct armada_plane_work *armada_drm_plane_work_cancel(
struct armada_crtc *dcrtc, struct armada_plane *plane);
void armada_drm_plane_work_cancel(struct armada_crtc *dcrtc,
struct armada_plane *plane);
void armada_drm_plane_calc_addrs(u32 *addrs, struct drm_framebuffer *fb,
int x, int y);
......@@ -104,8 +114,8 @@ struct armada_crtc {
void armada_drm_crtc_update_regs(struct armada_crtc *, struct armada_regs *);
void armada_drm_crtc_plane_disable(struct armada_crtc *dcrtc,
struct drm_plane *plane);
int armada_drm_plane_disable(struct drm_plane *plane,
struct drm_modeset_acquire_ctx *ctx);
extern struct platform_driver armada_lcd_platform_driver;
......
This diff is collapsed.
......@@ -34,14 +34,34 @@ TRACE_EVENT(armada_ovl_plane_update,
__field(struct drm_plane *, plane)
__field(struct drm_crtc *, crtc)
__field(struct drm_framebuffer *, fb)
__field(int, crtc_x)
__field(int, crtc_y)
__field(unsigned int, crtc_w)
__field(unsigned int, crtc_h)
__field(u32, src_x)
__field(u32, src_y)
__field(u32, src_w)
__field(u32, src_h)
),
TP_fast_assign(
__entry->plane = plane;
__entry->crtc = crtc;
__entry->fb = fb;
__entry->crtc_x = crtc_x;
__entry->crtc_y = crtc_y;
__entry->crtc_w = crtc_w;
__entry->crtc_h = crtc_h;
__entry->src_x = src_x;
__entry->src_y = src_y;
__entry->src_w = src_w;
__entry->src_h = src_h;
),
TP_printk("plane %p crtc %p fb %p",
__entry->plane, __entry->crtc, __entry->fb)
TP_printk("plane %p crtc %p fb %p crtc @ (%d,%d, %ux%u) src @ (%u,%u, %ux%u)",
__entry->plane, __entry->crtc, __entry->fb,
__entry->crtc_x, __entry->crtc_y,
__entry->crtc_w, __entry->crtc_h,
__entry->src_x >> 16, __entry->src_y >> 16,
__entry->src_w >> 16, __entry->src_h >> 16)
);
TRACE_EVENT(armada_ovl_plane_work,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment