Merge tag 'topic/drm-misc-2016-06-07' of git://anongit.freedesktop.org/drm-intel into drm-next
As promised, piles of prep work all around: - drm_atomic_state rework, prep for nonblocking commit helpers - fence patches from Gustavo and Christian to prep for atomic fences and some cool work in ttm/amdgpu from Christian - drm event prep for both nonblocking commit and atomic fences - Gustavo seems on a crusade against the non-kms-native version of the vblank functions. - prep work from Boris to nuke all the silly ->best_encoder implementations we have (we really only need that for truly dynamic cases like dvi-i vs dvi-d or dp mst selecting the right transcoder on intel) - prep work from Laurent to rework the format handling functions - and few small things all over * tag 'topic/drm-misc-2016-06-07' of git://anongit.freedesktop.org/drm-intel: (47 commits) drm/dsi: Implement set tear scanline drm/fb_cma_helper: Implement fb_mmap callback drm/qxl: Remove useless drm_fb_get_bpp_depth() call drm/ast: Remove useless drm_fb_get_bpp_depth() call drm/atomic: Fix remaining places where !funcs->best_encoder is valid drm/core: Change declaration for gamma_set. Documentation: add fence-array to kernel DocBook drm/shmobile: use drm_crtc_vblank_{get,put}() drm/radeon: use drm_crtc_vblank_{get,put}() drm/qxl: use drm_crtc_vblank_{get,put}() drm/atmel: use drm_crtc_vblank_{get,put}() drm/armada: use drm_crtc_vblank_{get,put}() drm/amdgpu: use drm_crtc_vblank_{get,put}() drm/virtio: use drm_crtc_send_vblank_event() drm/udl: use drm_crtc_send_vblank_event() drm/qxl: use drm_crtc_send_vblank_event() drm/atmel: use drm_crtc_send_vblank_event() drm/armada: use drm_crtc_send_vblank_event() drm/doc: Switch to sphinx/rst fixed-width quoting drm/doc: Drop kerneldoc for static functions in drm_irq.c ...
此提交包含在:
@@ -288,6 +288,8 @@ static int rcar_du_atomic_commit(struct drm_device *dev,
|
||||
{
|
||||
struct rcar_du_device *rcdu = dev->dev_private;
|
||||
struct rcar_du_commit *commit;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *crtc_state;
|
||||
unsigned int i;
|
||||
int ret;
|
||||
|
||||
@@ -309,10 +311,8 @@ static int rcar_du_atomic_commit(struct drm_device *dev,
|
||||
/* Wait until all affected CRTCs have completed previous commits and
|
||||
* mark them as pending.
|
||||
*/
|
||||
for (i = 0; i < dev->mode_config.num_crtc; ++i) {
|
||||
if (state->crtcs[i])
|
||||
commit->crtcs |= 1 << drm_crtc_index(state->crtcs[i]);
|
||||
}
|
||||
for_each_crtc_in_state(state, crtc, crtc_state, i)
|
||||
commit->crtcs |= drm_crtc_mask(crtc);
|
||||
|
||||
spin_lock(&rcdu->commit.wait.lock);
|
||||
ret = wait_event_interruptible_locked(rcdu->commit.wait,
|
||||
|
@@ -140,18 +140,17 @@ int rcar_du_atomic_check_planes(struct drm_device *dev,
|
||||
bool needs_realloc = false;
|
||||
unsigned int groups = 0;
|
||||
unsigned int i;
|
||||
struct drm_plane *drm_plane;
|
||||
struct drm_plane_state *drm_plane_state;
|
||||
|
||||
/* Check if hardware planes need to be reallocated. */
|
||||
for (i = 0; i < dev->mode_config.num_total_plane; ++i) {
|
||||
for_each_plane_in_state(state, drm_plane, drm_plane_state, i) {
|
||||
struct rcar_du_plane_state *plane_state;
|
||||
struct rcar_du_plane *plane;
|
||||
unsigned int index;
|
||||
|
||||
if (!state->planes[i])
|
||||
continue;
|
||||
|
||||
plane = to_rcar_plane(state->planes[i]);
|
||||
plane_state = to_rcar_plane_state(state->plane_states[i]);
|
||||
plane = to_rcar_plane(drm_plane);
|
||||
plane_state = to_rcar_plane_state(drm_plane_state);
|
||||
|
||||
dev_dbg(rcdu->dev, "%s: checking plane (%u,%tu)\n", __func__,
|
||||
plane->group->index, plane - plane->group->planes);
|
||||
@@ -247,18 +246,15 @@ int rcar_du_atomic_check_planes(struct drm_device *dev,
|
||||
}
|
||||
|
||||
/* Reallocate hardware planes for each plane that needs it. */
|
||||
for (i = 0; i < dev->mode_config.num_total_plane; ++i) {
|
||||
for_each_plane_in_state(state, drm_plane, drm_plane_state, i) {
|
||||
struct rcar_du_plane_state *plane_state;
|
||||
struct rcar_du_plane *plane;
|
||||
unsigned int crtc_planes;
|
||||
unsigned int free;
|
||||
int idx;
|
||||
|
||||
if (!state->planes[i])
|
||||
continue;
|
||||
|
||||
plane = to_rcar_plane(state->planes[i]);
|
||||
plane_state = to_rcar_plane_state(state->plane_states[i]);
|
||||
plane = to_rcar_plane(drm_plane);
|
||||
plane_state = to_rcar_plane_state(drm_plane_state);
|
||||
|
||||
dev_dbg(rcdu->dev, "%s: allocating plane (%u,%tu)\n", __func__,
|
||||
plane->group->index, plane - plane->group->planes);
|
||||
|
新增問題並參考
封鎖使用者