linux-next: manual merge of the drm-misc tree with Linus' tree

2021-01-20 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/ttm/ttm_pool.c

between commit:

  bb52cb0dec8d ("drm/ttm: make the pool shrinker lock a mutex")

from Linus' tree and commits:

  ba051901d10f ("drm/ttm: add a debugfs file for the global page pools")
  f987c9e0f537 ("drm/ttm: optimize ttm pool shrinker a bit")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/ttm/ttm_pool.c
index 11e0313db0ea,e0617717113f..
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@@ -503,11 -505,14 +506,13 @@@ void ttm_pool_init(struct ttm_pool *poo
pool->use_dma_alloc = use_dma_alloc;
pool->use_dma32 = use_dma32;
  
-   for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i)
-   for (j = 0; j < MAX_ORDER; ++j)
-   ttm_pool_type_init(>caching[i].orders[j],
-  pool, i, j);
+   if (use_dma_alloc) {
+   for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i)
+   for (j = 0; j < MAX_ORDER; ++j)
+   ttm_pool_type_init(>caching[i].orders[j],
+  pool, i, j);
+   }
  }
 -EXPORT_SYMBOL(ttm_pool_init);
  
  /**
   * ttm_pool_fini - Cleanup a pool
@@@ -521,9 -526,34 +526,33 @@@ void ttm_pool_fini(struct ttm_pool *poo
  {
unsigned int i, j;
  
-   for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i)
-   for (j = 0; j < MAX_ORDER; ++j)
-   ttm_pool_type_fini(>caching[i].orders[j]);
+   if (pool->use_dma_alloc) {
+   for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i)
+   for (j = 0; j < MAX_ORDER; ++j)
+   ttm_pool_type_fini(>caching[i].orders[j]);
+   }
+ }
 -EXPORT_SYMBOL(ttm_pool_fini);
+ 
+ /* As long as pages are available make sure to release at least one */
+ static unsigned long ttm_pool_shrinker_scan(struct shrinker *shrink,
+   struct shrink_control *sc)
+ {
+   unsigned long num_freed = 0;
+ 
+   do
+   num_freed += ttm_pool_shrink();
+   while (!num_freed && atomic_long_read(_pages));
+ 
+   return num_freed;
+ }
+ 
+ /* Return the number of pages available or SHRINK_EMPTY if we have none */
+ static unsigned long ttm_pool_shrinker_count(struct shrinker *shrink,
+struct shrink_control *sc)
+ {
+   unsigned long num_pages = atomic_long_read(_pages);
+ 
+   return num_pages ? num_pages : SHRINK_EMPTY;
  }
  
  #ifdef CONFIG_DEBUG_FS
@@@ -553,6 -594,35 +593,35 @@@ static void ttm_pool_debugfs_orders(str
seq_puts(m, "\n");
  }
  
+ /* Dump the total amount of allocated pages */
+ static void ttm_pool_debugfs_footer(struct seq_file *m)
+ {
+   seq_printf(m, "\ntotal\t: %8lu of %8lu\n",
+  atomic_long_read(_pages), page_pool_size);
+ }
+ 
+ /* Dump the information for the global pools */
+ static int ttm_pool_debugfs_globals_show(struct seq_file *m, void *data)
+ {
+   ttm_pool_debugfs_header(m);
+ 
 -  spin_lock(_lock);
++  mutex_lock(_lock);
+   seq_puts(m, "wc\t:");
+   ttm_pool_debugfs_orders(global_write_combined, m);
+   seq_puts(m, "uc\t:");
+   ttm_pool_debugfs_orders(global_uncached, m);
+   seq_puts(m, "wc 32\t:");
+   ttm_pool_debugfs_orders(global_dma32_write_combined, m);
+   seq_puts(m, "uc 32\t:");
+   ttm_pool_debugfs_orders(global_dma32_uncached, m);
 -  spin_unlock(_lock);
++  mutex_unlock(_lock);
+ 
+   ttm_pool_debugfs_footer(m);
+ 
+   return 0;
+ }
+ DEFINE_SHOW_ATTRIBUTE(ttm_pool_debugfs_globals);
+ 
  /**
   * ttm_pool_debugfs - Debugfs dump function for a pool
   *
@@@ -565,23 -635,14 +634,14 @@@ int ttm_pool_debugfs(struct ttm_pool *p
  {
unsigned int i;
  
-   mutex_lock(_lock);
- 
-   seq_puts(m, "\t ");
-   for (i = 0; i < MAX_ORDER; ++i)
-   seq_printf(m, " ---%2u---", i);
-   seq_puts(m, "\n");
- 
-   seq_puts(m, "wc\t:");
-   ttm_pool_debugfs_orders(global_write_combined, m);
-   seq_puts(m, "uc\t:");
-   ttm_pool_debugfs_orders(global_uncached, m);
+   if (!pool->use_dma_alloc) {
+   seq_puts(m, "unused\n");
+   return 0;
+   }
  
-   seq_puts(m, "wc 32\t:");
-   ttm_pool_debugfs_orders(global_dma32_write_combined, m);
-   seq_puts(m, "uc 32\t:");
-   ttm_pool_debugfs_orders(global_dma32_uncached, m);
+   ttm_pool_debugfs_header(m);
  
 -  

linux-next: manual merge of the drm-misc tree with Linus' tree

2020-10-26 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/virtio/virtgpu_vq.c

between commit:

  75ef337bdba4 ("drm: virtio: fix common struct sg_table related issues")

from Linus' tree and commit:

  50c3d1938ee3 ("drm/virtio: implement blob resources: fix stride discrepancy")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/virtio/virtgpu_vq.c
index 07945ca238e2,c1824f536936..
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@@ -1024,11 -1027,14 +1026,13 @@@ void virtio_gpu_cmd_transfer_to_host_3d
struct virtio_gpu_transfer_host_3d *cmd_p;
struct virtio_gpu_vbuffer *vbuf;
bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev);
-   struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo);
  
-   if (use_dma_api)
+   if (virtio_gpu_is_shmem(bo) && use_dma_api) {
+   struct virtio_gpu_object_shmem *shmem = to_virtio_gpu_shmem(bo);
+ 
 -  dma_sync_sg_for_device(vgdev->vdev->dev.parent,
 - shmem->pages->sgl, shmem->pages->nents,
 - DMA_TO_DEVICE);
 +  dma_sync_sgtable_for_device(vgdev->vdev->dev.parent,
 +  shmem->pages, DMA_TO_DEVICE);
+   }
  
cmd_p = virtio_gpu_alloc_cmd(vgdev, , sizeof(*cmd_p));
memset(cmd_p, 0, sizeof(*cmd_p));


pgpxav51iGCJV.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the drm-misc tree with Linus' tree

2020-10-26 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c

between commit:

  e12e5263bf1d ("drm/msm/dpu: clean up some impossibilities")

from Linus' tree and commit:

  351f950db4ab ("drm/atomic: Pass the full state to CRTC atomic enable/disable")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index f56414a06ec4,5ba9b49dfa7a..
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@@ -706,10 -753,12 +707,12 @@@ static struct drm_crtc_state *dpu_crtc_
  }
  
  static void dpu_crtc_disable(struct drm_crtc *crtc,
-struct drm_crtc_state *old_crtc_state)
+struct drm_atomic_state *state)
  {
+   struct drm_crtc_state *old_crtc_state = 
drm_atomic_get_old_crtc_state(state,
+ 
crtc);
 -  struct dpu_crtc *dpu_crtc;
 -  struct dpu_crtc_state *cstate;
 +  struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
 +  struct dpu_crtc_state *cstate = to_dpu_crtc_state(crtc->state);
struct drm_encoder *encoder;
unsigned long flags;
bool release_bandwidth = false;
@@@ -770,9 -826,9 +773,9 @@@
  }
  
  static void dpu_crtc_enable(struct drm_crtc *crtc,
-   struct drm_crtc_state *old_crtc_state)
+   struct drm_atomic_state *state)
  {
 -  struct dpu_crtc *dpu_crtc;
 +  struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
struct drm_encoder *encoder;
bool request_bandwidth = false;
  


pgphqrV8DOIzU.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the drm-misc tree with Linus' tree

2020-10-26 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  include/drm/drm_dp_helper.h

between commit:

  a77ed90da6bb ("drm/dp: Define protocol converter DPCD registers")

from Linus' tree and commit:

  6e5702980b14 ("drm/dp: add subheadings to DPCD address definitions")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/drm/drm_dp_helper.h
index da53aebb7230,ae4e20245ba3..
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@@ -1003,16 -1035,7 +1054,17 @@@ struct drm_device
  #define DP_CEC_TX_MESSAGE_BUFFER   0x3020
  #define DP_CEC_MESSAGE_BUFFER_LENGTH 0x10
  
 +#define DP_PROTOCOL_CONVERTER_CONTROL_0   0x3050 /* DP 1.3 */
 +# define DP_HDMI_DVI_OUTPUT_CONFIG(1 << 0) /* DP 1.3 */
 +#define DP_PROTOCOL_CONVERTER_CONTROL_1   0x3051 /* DP 1.3 */
 +# define DP_CONVERSION_TO_YCBCR420_ENABLE (1 << 0) /* DP 1.3 */
 +# define DP_HDMI_EDID_PROCESSING_DISABLE  (1 << 1) /* DP 1.4 */
 +# define DP_HDMI_AUTONOMOUS_SCRAMBLING_DISABLE(1 << 2) /* DP 1.4 */
 +# define DP_HDMI_FORCE_SCRAMBLING (1 << 3) /* DP 1.4 */
 +#define DP_PROTOCOL_CONVERTER_CONTROL_2   0x3052 /* DP 1.3 */
 +# define DP_CONVERSION_TO_YCBCR422_ENABLE (1 << 0) /* DP 1.3 */
 +
+ /* HDCP 1.3 and HDCP 2.2 */
  #define DP_AUX_HDCP_BKSV  0x68000
  #define DP_AUX_HDCP_RI_PRIME  0x68005
  #define DP_AUX_HDCP_AKSV  0x68007


pgpvIDDRrDcAn.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the drm-misc tree with Linus' tree

2020-09-01 Thread Stephen Rothwell
Hi all,

On Wed, 26 Aug 2020 10:01:13 +1000 Stephen Rothwell  
wrote:
>
> Hi all,
> 
> Today's linux-next merge of the drm-misc tree got conflicts in:
> 
>   drivers/video/fbdev/arcfb.c
>   drivers/video/fbdev/atmel_lcdfb.c
>   drivers/video/fbdev/savage/savagefb_driver.c
> 
> between commit:
> 
>   df561f6688fe ("treewide: Use fallthrough pseudo-keyword")
> 
> from Linus' tree and commit:
> 
>   ad04fae0de07 ("fbdev: Use fallthrough pseudo-keyword")
> 
> from the drm-misc tree.
> 
> I fixed it up (they are much the same, I just used the version from Linus'
> tree) and can carry the fix as necessary. This is now fixed as far as
> linux-next is concerned, but any non trivial conflicts should be mentioned
> to your upstream maintainer when your tree is submitted for merging.
> You may also want to consider cooperating with the maintainer of the
> conflicting tree to minimise any particularly complex conflicts.

These conflicts now appear in the merge between the drm tree and Linus'
tree.

-- 
Cheers,
Stephen Rothwell


pgpkUDftM3X1q.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the drm-misc tree with Linus' tree

2020-08-25 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got conflicts in:

  drivers/video/fbdev/arcfb.c
  drivers/video/fbdev/atmel_lcdfb.c
  drivers/video/fbdev/savage/savagefb_driver.c

between commit:

  df561f6688fe ("treewide: Use fallthrough pseudo-keyword")

from Linus' tree and commit:

  ad04fae0de07 ("fbdev: Use fallthrough pseudo-keyword")

from the drm-misc tree.

I fixed it up (they are much the same, I just used the version from Linus'
tree) and can carry the fix as necessary. This is now fixed as far as
linux-next is concerned, but any non trivial conflicts should be mentioned
to your upstream maintainer when your tree is submitted for merging.
You may also want to consider cooperating with the maintainer of the
conflicting tree to minimise any particularly complex conflicts.



-- 
Cheers,
Stephen Rothwell


pgpLMmFsSytwU.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the drm-misc tree with Linus' tree

2020-06-28 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got conflicts in:

  drivers/gpu/drm/nouveau/dispnv04/crtc.c
  drivers/gpu/drm/nouveau/dispnv04/overlay.c
  drivers/gpu/drm/nouveau/dispnv50/base507c.c
  drivers/gpu/drm/nouveau/dispnv50/wndw.c
  drivers/gpu/drm/nouveau/nouveau_dmem.c
  drivers/gpu/drm/nouveau/nouveau_fbcon.c

between commits:

  183405879255 ("drm/nouveau/kms: Remove field nvbo from struct 
nouveau_framebuffer")
  c586f30bf74c ("drm/nouveau/kms: Add format mod prop to base/ovly/nvdisp")
  1d7f940c3a16 ("drm/nouveau/nouveau/hmm: fix nouveau_dmem_chunk allocations")

from Linus' tree and commit:

  0dc9b286b8d2 ("drm/nouveau: don't use ttm bo->offset v3")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/nouveau/dispnv04/crtc.c
index 640738f3196c,cc6ab3c2eec7..
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@@ -840,12 -839,13 +840,12 @@@ nv04_crtc_do_mode_set_base(struct drm_c
 */
if (atomic) {
drm_fb = passed_fb;
 -  fb = nouveau_framebuffer(passed_fb);
} else {
drm_fb = crtc->primary->fb;
 -  fb = nouveau_framebuffer(crtc->primary->fb);
}
  
 -  nv_crtc->fb.offset = fb->nvbo->offset;
 +  nvbo = nouveau_gem_object(drm_fb->obj[0]);
-   nv_crtc->fb.offset = nvbo->bo.offset;
++  nv_crtc->fb.offset = nvbo->offset;
  
if (nv_crtc->lut.depth != drm_fb->format->depth) {
nv_crtc->lut.depth = drm_fb->format->depth;
diff --cc drivers/gpu/drm/nouveau/dispnv04/overlay.c
index 6248fd1dbc6d,9529bd9053e7..
--- a/drivers/gpu/drm/nouveau/dispnv04/overlay.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/overlay.c
@@@ -152,7 -150,7 +152,7 @@@ nv10_update_plane(struct drm_plane *pla
nvif_mask(dev, NV_PCRTC_ENGINE_CTRL + soff2, NV_CRTC_FSEL_OVERLAY, 0);
  
nvif_wr32(dev, NV_PVIDEO_BASE(flip), 0);
-   nvif_wr32(dev, NV_PVIDEO_OFFSET_BUFF(flip), nvbo->bo.offset);
 -  nvif_wr32(dev, NV_PVIDEO_OFFSET_BUFF(flip), nv_fb->nvbo->offset);
++  nvif_wr32(dev, NV_PVIDEO_OFFSET_BUFF(flip), nvbo->offset);
nvif_wr32(dev, NV_PVIDEO_SIZE_IN(flip), src_h << 16 | src_w);
nvif_wr32(dev, NV_PVIDEO_POINT_IN(flip), src_y << 16 | src_x);
nvif_wr32(dev, NV_PVIDEO_DS_DX(flip), (src_w << 20) / crtc_w);
@@@ -174,7 -172,7 +174,7 @@@
if (format & NV_PVIDEO_FORMAT_PLANAR) {
nvif_wr32(dev, NV_PVIDEO_UVPLANE_BASE(flip), 0);
nvif_wr32(dev, NV_PVIDEO_UVPLANE_OFFSET_BUFF(flip),
-   nvbo->bo.offset + fb->offsets[1]);
 -  nv_fb->nvbo->offset + fb->offsets[1]);
++  nvbo->offset + fb->offsets[1]);
}
nvif_wr32(dev, NV_PVIDEO_FORMAT(flip), format | fb->pitches[0]);
nvif_wr32(dev, NV_PVIDEO_STOP, 0);
@@@ -399,7 -396,7 +399,7 @@@ nv04_update_plane(struct drm_plane *pla
  
for (i = 0; i < 2; i++) {
nvif_wr32(dev, NV_PVIDEO_BUFF0_START_ADDRESS + 4 * i,
- nvbo->bo.offset);
 -nv_fb->nvbo->offset);
++nvbo->offset);
nvif_wr32(dev, NV_PVIDEO_BUFF0_PITCH_LENGTH + 4 * i,
  fb->pitches[0]);
nvif_wr32(dev, NV_PVIDEO_BUFF0_OFFSET + 4 * i, 0);
diff --cc drivers/gpu/drm/nouveau/dispnv50/base507c.c
index 511258bfbcbc,b60aa987d7b4..
--- a/drivers/gpu/drm/nouveau/dispnv50/base507c.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/base507c.c
@@@ -274,9 -273,9 +274,9 @@@ base507c_new_(const struct nv50_wndw_fu
if (*pwndw = wndw, ret)
return ret;
  
 -  ret = nv50_dmac_create(>client.device, >disp->object,
 +  ret = nv50_dmac_create(>client.device, >disp.object,
   , head, , sizeof(args),
-  disp50->sync->bo.offset, >wndw);
 - disp->sync->offset, >wndw);
++ disp50->sync->offset, >wndw);
if (ret) {
NV_ERROR(drm, "base%04x allocation failed: %d\n", oclass, ret);
return ret;
diff --cc drivers/gpu/drm/nouveau/dispnv50/wndw.c
index 99b9b681736d,ee0fd817185e..
--- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c
@@@ -521,12 -507,11 +521,12 @@@ nv50_wndw_prepare_fb(struct drm_plane *
return PTR_ERR(ctxdma);
}
  
 -  asyw->image.handle[0] = ctxdma->object.handle;
 +  if 

linux-next: manual merge of the drm-misc tree with Linus' tree

2020-06-25 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c

between commit:

  eaad0c3aa978 ("drm/amdgpu: rename direct to immediate for VM updates")

from the Linus' and commit:

  b1a8ef952a25 ("drm/amdgpu: move ttm bo->offset to amdgpu_bo")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
index 28bdfb3ac33d,2a7a6f62d627..
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
@@@ -144,8 -141,8 +144,8 @@@ static void amdgpu_vm_sdma_copy_ptes(st
  
src += p->num_dw_left * 4;
  
-   pe += amdgpu_gmc_sign_extend(bo->tbo.offset);
+   pe += amdgpu_bo_gpu_offset_no_check(bo);
 -  trace_amdgpu_vm_copy_ptes(pe, src, count, p->direct);
 +  trace_amdgpu_vm_copy_ptes(pe, src, count, p->immediate);
  
amdgpu_vm_copy_pte(p->adev, ib, pe, src, count);
  }
@@@ -171,8 -168,8 +171,8 @@@ static void amdgpu_vm_sdma_set_ptes(str
  {
struct amdgpu_ib *ib = p->job->ibs;
  
-   pe += amdgpu_gmc_sign_extend(bo->tbo.offset);
+   pe += amdgpu_bo_gpu_offset_no_check(bo);
 -  trace_amdgpu_vm_set_ptes(pe, addr, count, incr, flags, p->direct);
 +  trace_amdgpu_vm_set_ptes(pe, addr, count, incr, flags, p->immediate);
if (count < 3) {
amdgpu_vm_write_pte(p->adev, ib, pe, addr | flags,
count, incr);


pgpuMWeGLIVtZ.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the drm-misc tree with Linus' tree

2020-06-16 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/nouveau/nouveau_display.c

between commit:

  183405879255 ("drm/nouveau/kms: Remove field nvbo from struct 
nouveau_framebuffer")

from Linus' tree and commit:

  cdc194cebd71 ("drm/nouveau: remove _unlocked suffix in 
drm_gem_object_put_unlocked")

from the drm-misc tree.

I fixed it up (the former just removed one of the functions modified
by the latter) and can carry the fix as necessary. This is now fixed as
far as linux-next is concerned, but any non trivial conflicts should be
mentioned to your upstream maintainer when your tree is submitted for
merging.  You may also want to consider cooperating with the maintainer
of the conflicting tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


pgp3s1diElUK0.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the drm-misc tree with Linus' tree

2019-01-10 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/omapdrm/omap_encoder.c

between commit:

  3c613a3bddd3 ("drm/omap: fix incorrect union usage")

from Linus' tree and commit:

  13d0add333af ("drm/edid: Pass connector to AVI infoframe functions")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/omapdrm/omap_encoder.c
index 933ebc9f9faa,4566e0a75cb8..
--- a/drivers/gpu/drm/omapdrm/omap_encoder.c
+++ b/drivers/gpu/drm/omapdrm/omap_encoder.c
@@@ -52,37 -52,6 +52,37 @@@ static const struct drm_encoder_funcs o
.destroy = omap_encoder_destroy,
  };
  
 +static void omap_encoder_hdmi_mode_set(struct drm_encoder *encoder,
 + struct drm_display_mode *adjusted_mode)
 +{
 +  struct drm_device *dev = encoder->dev;
 +  struct omap_encoder *omap_encoder = to_omap_encoder(encoder);
 +  struct omap_dss_device *dssdev = omap_encoder->output;
 +  struct drm_connector *connector;
 +  bool hdmi_mode;
 +
 +  hdmi_mode = false;
 +  list_for_each_entry(connector, >mode_config.connector_list, head) {
 +  if (connector->encoder == encoder) {
 +  hdmi_mode = omap_connector_get_hdmi_mode(connector);
 +  break;
 +  }
 +  }
 +
 +  if (dssdev->ops->hdmi.set_hdmi_mode)
 +  dssdev->ops->hdmi.set_hdmi_mode(dssdev, hdmi_mode);
 +
 +  if (hdmi_mode && dssdev->ops->hdmi.set_infoframe) {
 +  struct hdmi_avi_infoframe avi;
 +  int r;
 +
-   r = drm_hdmi_avi_infoframe_from_display_mode(, 
adjusted_mode,
-false);
++  r = drm_hdmi_avi_infoframe_from_display_mode(, connector,
++   adjusted_mode);
 +  if (r == 0)
 +  dssdev->ops->hdmi.set_infoframe(dssdev, );
 +  }
 +}
 +
  static void omap_encoder_mode_set(struct drm_encoder *encoder,
  struct drm_display_mode *mode,
  struct drm_display_mode *adjusted_mode)


pgpGCfjpLE3yP.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the drm-misc tree with Linus' tree

2018-03-22 Thread Stephen Rothwell
Hi all,

On Thu, 15 Mar 2018 14:14:25 +1100 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the drm-misc tree got a conflict in:
> 
>   sound/pci/hda/hda_intel.c
> 
> between commits:
> 
>   1ba8f9d30817 ("ALSA: hda: Add a power_save blacklist")
>   40088dc4e1ea ("ALSA: hda - Revert power_save option default value")
> 
> from Linus' tree and commit:
> 
>   07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller")
> 
> from the drm-misc tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc sound/pci/hda/hda_intel.c
> index d5017adf9feb,ec4e6b829ee2..
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@@ -2219,8 -2201,8 +2223,9 @@@ static int azx_probe_continue(struct az
>   struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
>   struct hdac_bus *bus = azx_bus(chip);
>   struct pci_dev *pci = chip->pci;
> + struct hda_codec *codec;
>   int dev = chip->dev_index;
>  +int val;
>   int err;
>   
>   hda->probe_continued = 1;
> @@@ -2302,21 -2284,16 +2307,30 @@@
>   chip->running = 1;
>   azx_add_card_list(chip);
>   
>  +val = power_save;
>  +#ifdef CONFIG_PM
>  +if (pm_blacklist) {
>  +const struct snd_pci_quirk *q;
>  +
>  +q = snd_pci_quirk_lookup(chip->pci, power_save_blacklist);
>  +if (q && val) {
>  +dev_info(chip->card->dev, "device %04x:%04x is on the 
> power_save blacklist, forcing power_save to 0\n",
>  + q->subvendor, q->subdevice);
>  +val = 0;
>  +}
>  +}
>  +#endif /* CONFIG_PM */
> ++
> + /*
> +  * The discrete GPU cannot power down unless the HDA controller runtime
> +  * suspends, so activate runtime PM on codecs even if power_save == 0.
> +  */
> + if (use_vga_switcheroo(hda))
> + list_for_each_codec(codec, >bus)
> + codec->auto_runtime_pm = 1;
> + 
>  -snd_hda_set_power_save(>bus, power_save * 1000);
>  +snd_hda_set_power_save(>bus, val * 1000);
> - if (azx_has_pm_runtime(chip) || hda->use_vga_switcheroo)
> + if (azx_has_pm_runtime(chip))
>   pm_runtime_put_autosuspend(>dev);
>   
>   out_free:

This is now a conflict between the drm tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell


pgpyHZrOBqB_q.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the drm-misc tree with Linus' tree

2018-03-22 Thread Stephen Rothwell
Hi all,

On Thu, 15 Mar 2018 14:14:25 +1100 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the drm-misc tree got a conflict in:
> 
>   sound/pci/hda/hda_intel.c
> 
> between commits:
> 
>   1ba8f9d30817 ("ALSA: hda: Add a power_save blacklist")
>   40088dc4e1ea ("ALSA: hda - Revert power_save option default value")
> 
> from Linus' tree and commit:
> 
>   07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller")
> 
> from the drm-misc tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc sound/pci/hda/hda_intel.c
> index d5017adf9feb,ec4e6b829ee2..
> --- a/sound/pci/hda/hda_intel.c
> +++ b/sound/pci/hda/hda_intel.c
> @@@ -2219,8 -2201,8 +2223,9 @@@ static int azx_probe_continue(struct az
>   struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
>   struct hdac_bus *bus = azx_bus(chip);
>   struct pci_dev *pci = chip->pci;
> + struct hda_codec *codec;
>   int dev = chip->dev_index;
>  +int val;
>   int err;
>   
>   hda->probe_continued = 1;
> @@@ -2302,21 -2284,16 +2307,30 @@@
>   chip->running = 1;
>   azx_add_card_list(chip);
>   
>  +val = power_save;
>  +#ifdef CONFIG_PM
>  +if (pm_blacklist) {
>  +const struct snd_pci_quirk *q;
>  +
>  +q = snd_pci_quirk_lookup(chip->pci, power_save_blacklist);
>  +if (q && val) {
>  +dev_info(chip->card->dev, "device %04x:%04x is on the 
> power_save blacklist, forcing power_save to 0\n",
>  + q->subvendor, q->subdevice);
>  +val = 0;
>  +}
>  +}
>  +#endif /* CONFIG_PM */
> ++
> + /*
> +  * The discrete GPU cannot power down unless the HDA controller runtime
> +  * suspends, so activate runtime PM on codecs even if power_save == 0.
> +  */
> + if (use_vga_switcheroo(hda))
> + list_for_each_codec(codec, >bus)
> + codec->auto_runtime_pm = 1;
> + 
>  -snd_hda_set_power_save(>bus, power_save * 1000);
>  +snd_hda_set_power_save(>bus, val * 1000);
> - if (azx_has_pm_runtime(chip) || hda->use_vga_switcheroo)
> + if (azx_has_pm_runtime(chip))
>   pm_runtime_put_autosuspend(>dev);
>   
>   out_free:

This is now a conflict between the drm tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell


pgpyHZrOBqB_q.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the drm-misc tree with Linus' tree

2018-03-22 Thread Stephen Rothwell
Hi all,

On Tue, 20 Mar 2018 12:08:41 +1100 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the drm-misc tree got a conflict in:
> 
>   drivers/gpu/drm/sun4i/sun4i_tcon.h
> 
> between commit:
> 
>   e742a17cd360 ("drm/sun4i: tcon: Reduce the scope of the LVDS error a bit")
> 
> from Linus' tree and commit:
> 
>   6664e9dc5383 ("drm/sun4i: Add support for A80 TCONs")
> 
> from the drm-misc tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/gpu/drm/sun4i/sun4i_tcon.h
> index abdc6ad6b384,d3a945b7bb60..
> --- a/drivers/gpu/drm/sun4i/sun4i_tcon.h
> +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h
> @@@ -176,7 -176,7 +176,8 @@@ struct sun4i_tcon_quirks 
>   boolhas_channel_1;  /* a33 does not have channel 1 */
>   boolhas_lvds_alt;   /* Does the LVDS clock have a parent other than 
> the TCON clock? */
>   boolneeds_de_be_mux; /* sun6i needs mux to select backend */
>  +boolsupports_lvds;   /* Does the TCON support an LVDS output? */
> + boolneeds_edp_reset; /* a80 edp reset needed for tcon0 access */
>   
>   /* callback to handle tcon muxing options */
>   int (*set_mux)(struct sun4i_tcon *, const struct drm_encoder *);

This is now a conflict between the drm tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell


pgpDi2xg3Unhd.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the drm-misc tree with Linus' tree

2018-03-22 Thread Stephen Rothwell
Hi all,

On Tue, 20 Mar 2018 12:08:41 +1100 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the drm-misc tree got a conflict in:
> 
>   drivers/gpu/drm/sun4i/sun4i_tcon.h
> 
> between commit:
> 
>   e742a17cd360 ("drm/sun4i: tcon: Reduce the scope of the LVDS error a bit")
> 
> from Linus' tree and commit:
> 
>   6664e9dc5383 ("drm/sun4i: Add support for A80 TCONs")
> 
> from the drm-misc tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/gpu/drm/sun4i/sun4i_tcon.h
> index abdc6ad6b384,d3a945b7bb60..
> --- a/drivers/gpu/drm/sun4i/sun4i_tcon.h
> +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h
> @@@ -176,7 -176,7 +176,8 @@@ struct sun4i_tcon_quirks 
>   boolhas_channel_1;  /* a33 does not have channel 1 */
>   boolhas_lvds_alt;   /* Does the LVDS clock have a parent other than 
> the TCON clock? */
>   boolneeds_de_be_mux; /* sun6i needs mux to select backend */
>  +boolsupports_lvds;   /* Does the TCON support an LVDS output? */
> + boolneeds_edp_reset; /* a80 edp reset needed for tcon0 access */
>   
>   /* callback to handle tcon muxing options */
>   int (*set_mux)(struct sun4i_tcon *, const struct drm_encoder *);

This is now a conflict between the drm tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell


pgpDi2xg3Unhd.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the drm-misc tree with Linus' tree

2018-03-19 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/sun4i/sun4i_tcon.h

between commit:

  e742a17cd360 ("drm/sun4i: tcon: Reduce the scope of the LVDS error a bit")

from Linus' tree and commit:

  6664e9dc5383 ("drm/sun4i: Add support for A80 TCONs")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/sun4i/sun4i_tcon.h
index abdc6ad6b384,d3a945b7bb60..
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.h
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h
@@@ -176,7 -176,7 +176,8 @@@ struct sun4i_tcon_quirks 
boolhas_channel_1;  /* a33 does not have channel 1 */
boolhas_lvds_alt;   /* Does the LVDS clock have a parent other than 
the TCON clock? */
boolneeds_de_be_mux; /* sun6i needs mux to select backend */
 +  boolsupports_lvds;   /* Does the TCON support an LVDS output? */
+   boolneeds_edp_reset; /* a80 edp reset needed for tcon0 access */
  
/* callback to handle tcon muxing options */
int (*set_mux)(struct sun4i_tcon *, const struct drm_encoder *);


pgpQoOISz9B3m.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the drm-misc tree with Linus' tree

2018-03-19 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/sun4i/sun4i_tcon.h

between commit:

  e742a17cd360 ("drm/sun4i: tcon: Reduce the scope of the LVDS error a bit")

from Linus' tree and commit:

  6664e9dc5383 ("drm/sun4i: Add support for A80 TCONs")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/sun4i/sun4i_tcon.h
index abdc6ad6b384,d3a945b7bb60..
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.h
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h
@@@ -176,7 -176,7 +176,8 @@@ struct sun4i_tcon_quirks 
boolhas_channel_1;  /* a33 does not have channel 1 */
boolhas_lvds_alt;   /* Does the LVDS clock have a parent other than 
the TCON clock? */
boolneeds_de_be_mux; /* sun6i needs mux to select backend */
 +  boolsupports_lvds;   /* Does the TCON support an LVDS output? */
+   boolneeds_edp_reset; /* a80 edp reset needed for tcon0 access */
  
/* callback to handle tcon muxing options */
int (*set_mux)(struct sun4i_tcon *, const struct drm_encoder *);


pgpQoOISz9B3m.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the drm-misc tree with Linus' tree

2018-03-14 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  sound/pci/hda/hda_intel.c

between commits:

  1ba8f9d30817 ("ALSA: hda: Add a power_save blacklist")
  40088dc4e1ea ("ALSA: hda - Revert power_save option default value")

from Linus' tree and commit:

  07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc sound/pci/hda/hda_intel.c
index d5017adf9feb,ec4e6b829ee2..
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@@ -2219,8 -2201,8 +2223,9 @@@ static int azx_probe_continue(struct az
struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
struct hdac_bus *bus = azx_bus(chip);
struct pci_dev *pci = chip->pci;
+   struct hda_codec *codec;
int dev = chip->dev_index;
 +  int val;
int err;
  
hda->probe_continued = 1;
@@@ -2302,21 -2284,16 +2307,30 @@@
chip->running = 1;
azx_add_card_list(chip);
  
 +  val = power_save;
 +#ifdef CONFIG_PM
 +  if (pm_blacklist) {
 +  const struct snd_pci_quirk *q;
 +
 +  q = snd_pci_quirk_lookup(chip->pci, power_save_blacklist);
 +  if (q && val) {
 +  dev_info(chip->card->dev, "device %04x:%04x is on the 
power_save blacklist, forcing power_save to 0\n",
 +   q->subvendor, q->subdevice);
 +  val = 0;
 +  }
 +  }
 +#endif /* CONFIG_PM */
++
+   /*
+* The discrete GPU cannot power down unless the HDA controller runtime
+* suspends, so activate runtime PM on codecs even if power_save == 0.
+*/
+   if (use_vga_switcheroo(hda))
+   list_for_each_codec(codec, >bus)
+   codec->auto_runtime_pm = 1;
+ 
 -  snd_hda_set_power_save(>bus, power_save * 1000);
 +  snd_hda_set_power_save(>bus, val * 1000);
-   if (azx_has_pm_runtime(chip) || hda->use_vga_switcheroo)
+   if (azx_has_pm_runtime(chip))
pm_runtime_put_autosuspend(>dev);
  
  out_free:


pgp0IJPk8Eunq.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the drm-misc tree with Linus' tree

2018-03-14 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  sound/pci/hda/hda_intel.c

between commits:

  1ba8f9d30817 ("ALSA: hda: Add a power_save blacklist")
  40088dc4e1ea ("ALSA: hda - Revert power_save option default value")

from Linus' tree and commit:

  07f4f97d7b4b ("vga_switcheroo: Use device link for HDA controller")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc sound/pci/hda/hda_intel.c
index d5017adf9feb,ec4e6b829ee2..
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@@ -2219,8 -2201,8 +2223,9 @@@ static int azx_probe_continue(struct az
struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
struct hdac_bus *bus = azx_bus(chip);
struct pci_dev *pci = chip->pci;
+   struct hda_codec *codec;
int dev = chip->dev_index;
 +  int val;
int err;
  
hda->probe_continued = 1;
@@@ -2302,21 -2284,16 +2307,30 @@@
chip->running = 1;
azx_add_card_list(chip);
  
 +  val = power_save;
 +#ifdef CONFIG_PM
 +  if (pm_blacklist) {
 +  const struct snd_pci_quirk *q;
 +
 +  q = snd_pci_quirk_lookup(chip->pci, power_save_blacklist);
 +  if (q && val) {
 +  dev_info(chip->card->dev, "device %04x:%04x is on the 
power_save blacklist, forcing power_save to 0\n",
 +   q->subvendor, q->subdevice);
 +  val = 0;
 +  }
 +  }
 +#endif /* CONFIG_PM */
++
+   /*
+* The discrete GPU cannot power down unless the HDA controller runtime
+* suspends, so activate runtime PM on codecs even if power_save == 0.
+*/
+   if (use_vga_switcheroo(hda))
+   list_for_each_codec(codec, >bus)
+   codec->auto_runtime_pm = 1;
+ 
 -  snd_hda_set_power_save(>bus, power_save * 1000);
 +  snd_hda_set_power_save(>bus, val * 1000);
-   if (azx_has_pm_runtime(chip) || hda->use_vga_switcheroo)
+   if (azx_has_pm_runtime(chip))
pm_runtime_put_autosuspend(>dev);
  
  out_free:


pgp0IJPk8Eunq.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the drm-misc tree with Linus' tree

2017-09-21 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/i915/intel_display.c

between commit:

  fd70075f82b7 ("drm/i915: Trim struct_mutex usage for kms")

from Linus' tree and commits:

  21a01abbe32a ("drm/atomic: Fix freeing connector/plane state too early by 
tracking commits, v3.")
  669c9215afea ("drm/atomic: Make async plane update checks work as intended, 
v2.")

from the drm-misc tree.

I fixed it up (I basically used the latter version of the changes to
intel_legacy_cursor_update()) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the drm-misc tree with Linus' tree

2017-09-21 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/i915/intel_display.c

between commit:

  fd70075f82b7 ("drm/i915: Trim struct_mutex usage for kms")

from Linus' tree and commits:

  21a01abbe32a ("drm/atomic: Fix freeing connector/plane state too early by 
tracking commits, v3.")
  669c9215afea ("drm/atomic: Make async plane update checks work as intended, 
v2.")

from the drm-misc tree.

I fixed it up (I basically used the latter version of the changes to
intel_legacy_cursor_update()) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell


Re: linux-next: manual merge of the drm-misc tree with Linus' tree

2017-08-09 Thread Stephen Rothwell
Hi Dave,

On Wed, 2 Aug 2017 12:23:06 +1000 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the drm-misc tree got a conflict in:
> 
>   drivers/gpu/drm/nouveau/nv50_display.c
> 
> between commit:
> 
>   4a5431af19bc ("drm/nouveau/kms/nv50: update vblank state in response to 
> modeset actions")
> 
> from Linus' tree and commit:
> 
>   3c847d6cdadb ("drm/nouveau: Convert nouveau to use new iterator macros, 
> v2.")
> 
> from the drm-misc tree.
> 
> I fixed it up (I think - see below) and can carry the fix as necessary.
> This is now fixed as far as linux-next is concerned, but any non
> trivial conflicts should be mentioned to your upstream maintainer when
> your tree is submitted for merging.  You may also want to consider
> cooperating with the maintainer of the conflicting tree to minimise any
> particularly complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/gpu/drm/nouveau/nv50_display.c
> index 9d40b2a8be4d,bd1199b67eb4..
> --- a/drivers/gpu/drm/nouveau/nv50_display.c
> +++ b/drivers/gpu/drm/nouveau/nv50_display.c
> @@@ -3941,8 -3933,6 +3942,8 @@@ nv50_disp_atomic_commit_tail(struct drm
>   
>   NV_ATOMIC(drm, "%s: clr %04x (set %04x)\n", crtc->name,
> asyh->clr.mask, asyh->set.mask);
> - if (crtc_state->active && !asyh->state.active)
> ++if (new_crtc_state->active && !asyh->state.active)
>  +drm_crtc_vblank_off(crtc);
>   
>   if (asyh->clr.mask) {
>   nv50_head_flush_clr(head, asyh, atom->flush_disable);
> @@@ -4028,13 -4018,11 +4029,13 @@@
>   nv50_head_flush_set(head, asyh);
>   interlock_core = 1;
>   }
>  -}
>   
>  -for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
>  -if (new_crtc_state->event)
>  -drm_crtc_vblank_get(crtc);
>  +if (asyh->state.active) {
> - if (!crtc_state->active)
> ++if (!new_crtc_state->active)
>  +drm_crtc_vblank_on(crtc);
>  +if (asyh->state.event)
>  +drm_crtc_vblank_get(crtc);
>  +}
>   }
>   
>   /* Update plane(s). */
> @@@ -4077,18 -4065,16 +4078,18 @@@
>   NV_ERROR(drm, "%s: timeout\n", plane->name);
>   }
>   
> - for_each_crtc_in_state(state, crtc, crtc_state, i) {
> - if (crtc->state->event) {
> + for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
> + if (new_crtc_state->event) {
>   unsigned long flags;
>   /* Get correct count/ts if racing with vblank irq */
>  -drm_crtc_accurate_vblank_count(crtc);
>  +if (crtc->state->active)
>  +drm_crtc_accurate_vblank_count(crtc);
>   spin_lock_irqsave(>dev->event_lock, flags);
> - drm_crtc_send_vblank_event(crtc, crtc->state->event);
> + drm_crtc_send_vblank_event(crtc, new_crtc_state->event);
>   spin_unlock_irqrestore(>dev->event_lock, flags);
> - crtc->state->event = NULL;
> + new_crtc_state->event = NULL;
>  -drm_crtc_vblank_put(crtc);
>  +if (crtc->state->active)
>  +drm_crtc_vblank_put(crtc);
>   }
>   }
>   

This conflict is now between the drm tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell


Re: linux-next: manual merge of the drm-misc tree with Linus' tree

2017-08-09 Thread Stephen Rothwell
Hi Dave,

On Wed, 2 Aug 2017 12:23:06 +1000 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the drm-misc tree got a conflict in:
> 
>   drivers/gpu/drm/nouveau/nv50_display.c
> 
> between commit:
> 
>   4a5431af19bc ("drm/nouveau/kms/nv50: update vblank state in response to 
> modeset actions")
> 
> from Linus' tree and commit:
> 
>   3c847d6cdadb ("drm/nouveau: Convert nouveau to use new iterator macros, 
> v2.")
> 
> from the drm-misc tree.
> 
> I fixed it up (I think - see below) and can carry the fix as necessary.
> This is now fixed as far as linux-next is concerned, but any non
> trivial conflicts should be mentioned to your upstream maintainer when
> your tree is submitted for merging.  You may also want to consider
> cooperating with the maintainer of the conflicting tree to minimise any
> particularly complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/gpu/drm/nouveau/nv50_display.c
> index 9d40b2a8be4d,bd1199b67eb4..
> --- a/drivers/gpu/drm/nouveau/nv50_display.c
> +++ b/drivers/gpu/drm/nouveau/nv50_display.c
> @@@ -3941,8 -3933,6 +3942,8 @@@ nv50_disp_atomic_commit_tail(struct drm
>   
>   NV_ATOMIC(drm, "%s: clr %04x (set %04x)\n", crtc->name,
> asyh->clr.mask, asyh->set.mask);
> - if (crtc_state->active && !asyh->state.active)
> ++if (new_crtc_state->active && !asyh->state.active)
>  +drm_crtc_vblank_off(crtc);
>   
>   if (asyh->clr.mask) {
>   nv50_head_flush_clr(head, asyh, atom->flush_disable);
> @@@ -4028,13 -4018,11 +4029,13 @@@
>   nv50_head_flush_set(head, asyh);
>   interlock_core = 1;
>   }
>  -}
>   
>  -for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
>  -if (new_crtc_state->event)
>  -drm_crtc_vblank_get(crtc);
>  +if (asyh->state.active) {
> - if (!crtc_state->active)
> ++if (!new_crtc_state->active)
>  +drm_crtc_vblank_on(crtc);
>  +if (asyh->state.event)
>  +drm_crtc_vblank_get(crtc);
>  +}
>   }
>   
>   /* Update plane(s). */
> @@@ -4077,18 -4065,16 +4078,18 @@@
>   NV_ERROR(drm, "%s: timeout\n", plane->name);
>   }
>   
> - for_each_crtc_in_state(state, crtc, crtc_state, i) {
> - if (crtc->state->event) {
> + for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
> + if (new_crtc_state->event) {
>   unsigned long flags;
>   /* Get correct count/ts if racing with vblank irq */
>  -drm_crtc_accurate_vblank_count(crtc);
>  +if (crtc->state->active)
>  +drm_crtc_accurate_vblank_count(crtc);
>   spin_lock_irqsave(>dev->event_lock, flags);
> - drm_crtc_send_vblank_event(crtc, crtc->state->event);
> + drm_crtc_send_vblank_event(crtc, new_crtc_state->event);
>   spin_unlock_irqrestore(>dev->event_lock, flags);
> - crtc->state->event = NULL;
> + new_crtc_state->event = NULL;
>  -drm_crtc_vblank_put(crtc);
>  +if (crtc->state->active)
>  +drm_crtc_vblank_put(crtc);
>   }
>   }
>   

This conflict is now between the drm tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the drm-misc tree with Linus' tree

2017-08-01 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/nouveau/nv50_display.c

between commit:

  4a5431af19bc ("drm/nouveau/kms/nv50: update vblank state in response to 
modeset actions")

from Linus' tree and commit:

  3c847d6cdadb ("drm/nouveau: Convert nouveau to use new iterator macros, v2.")

from the drm-misc tree.

I fixed it up (I think - see below) and can carry the fix as necessary.
This is now fixed as far as linux-next is concerned, but any non
trivial conflicts should be mentioned to your upstream maintainer when
your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/nouveau/nv50_display.c
index 9d40b2a8be4d,bd1199b67eb4..
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@@ -3941,8 -3933,6 +3942,8 @@@ nv50_disp_atomic_commit_tail(struct drm
  
NV_ATOMIC(drm, "%s: clr %04x (set %04x)\n", crtc->name,
  asyh->clr.mask, asyh->set.mask);
-   if (crtc_state->active && !asyh->state.active)
++  if (new_crtc_state->active && !asyh->state.active)
 +  drm_crtc_vblank_off(crtc);
  
if (asyh->clr.mask) {
nv50_head_flush_clr(head, asyh, atom->flush_disable);
@@@ -4028,13 -4018,11 +4029,13 @@@
nv50_head_flush_set(head, asyh);
interlock_core = 1;
}
 -  }
  
 -  for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
 -  if (new_crtc_state->event)
 -  drm_crtc_vblank_get(crtc);
 +  if (asyh->state.active) {
-   if (!crtc_state->active)
++  if (!new_crtc_state->active)
 +  drm_crtc_vblank_on(crtc);
 +  if (asyh->state.event)
 +  drm_crtc_vblank_get(crtc);
 +  }
}
  
/* Update plane(s). */
@@@ -4077,18 -4065,16 +4078,18 @@@
NV_ERROR(drm, "%s: timeout\n", plane->name);
}
  
-   for_each_crtc_in_state(state, crtc, crtc_state, i) {
-   if (crtc->state->event) {
+   for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
+   if (new_crtc_state->event) {
unsigned long flags;
/* Get correct count/ts if racing with vblank irq */
 -  drm_crtc_accurate_vblank_count(crtc);
 +  if (crtc->state->active)
 +  drm_crtc_accurate_vblank_count(crtc);
spin_lock_irqsave(>dev->event_lock, flags);
-   drm_crtc_send_vblank_event(crtc, crtc->state->event);
+   drm_crtc_send_vblank_event(crtc, new_crtc_state->event);
spin_unlock_irqrestore(>dev->event_lock, flags);
-   crtc->state->event = NULL;
+   new_crtc_state->event = NULL;
 -  drm_crtc_vblank_put(crtc);
 +  if (crtc->state->active)
 +  drm_crtc_vblank_put(crtc);
}
}
  


linux-next: manual merge of the drm-misc tree with Linus' tree

2017-08-01 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/nouveau/nv50_display.c

between commit:

  4a5431af19bc ("drm/nouveau/kms/nv50: update vblank state in response to 
modeset actions")

from Linus' tree and commit:

  3c847d6cdadb ("drm/nouveau: Convert nouveau to use new iterator macros, v2.")

from the drm-misc tree.

I fixed it up (I think - see below) and can carry the fix as necessary.
This is now fixed as far as linux-next is concerned, but any non
trivial conflicts should be mentioned to your upstream maintainer when
your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/nouveau/nv50_display.c
index 9d40b2a8be4d,bd1199b67eb4..
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@@ -3941,8 -3933,6 +3942,8 @@@ nv50_disp_atomic_commit_tail(struct drm
  
NV_ATOMIC(drm, "%s: clr %04x (set %04x)\n", crtc->name,
  asyh->clr.mask, asyh->set.mask);
-   if (crtc_state->active && !asyh->state.active)
++  if (new_crtc_state->active && !asyh->state.active)
 +  drm_crtc_vblank_off(crtc);
  
if (asyh->clr.mask) {
nv50_head_flush_clr(head, asyh, atom->flush_disable);
@@@ -4028,13 -4018,11 +4029,13 @@@
nv50_head_flush_set(head, asyh);
interlock_core = 1;
}
 -  }
  
 -  for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
 -  if (new_crtc_state->event)
 -  drm_crtc_vblank_get(crtc);
 +  if (asyh->state.active) {
-   if (!crtc_state->active)
++  if (!new_crtc_state->active)
 +  drm_crtc_vblank_on(crtc);
 +  if (asyh->state.event)
 +  drm_crtc_vblank_get(crtc);
 +  }
}
  
/* Update plane(s). */
@@@ -4077,18 -4065,16 +4078,18 @@@
NV_ERROR(drm, "%s: timeout\n", plane->name);
}
  
-   for_each_crtc_in_state(state, crtc, crtc_state, i) {
-   if (crtc->state->event) {
+   for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
+   if (new_crtc_state->event) {
unsigned long flags;
/* Get correct count/ts if racing with vblank irq */
 -  drm_crtc_accurate_vblank_count(crtc);
 +  if (crtc->state->active)
 +  drm_crtc_accurate_vblank_count(crtc);
spin_lock_irqsave(>dev->event_lock, flags);
-   drm_crtc_send_vblank_event(crtc, crtc->state->event);
+   drm_crtc_send_vblank_event(crtc, new_crtc_state->event);
spin_unlock_irqrestore(>dev->event_lock, flags);
-   crtc->state->event = NULL;
+   new_crtc_state->event = NULL;
 -  drm_crtc_vblank_put(crtc);
 +  if (crtc->state->active)
 +  drm_crtc_vblank_put(crtc);
}
}
  


linux-next: manual merge of the drm-misc tree with Linus' tree

2017-07-18 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/i915/i915_reg.h

between commit:

  c379b897ba1a ("drm/i915/cnl: Fix the CURSOR_COEFF_MASK used in DDI Vswing 
Programming")

from Linus' tree and commit:

  5a8dd2af31a7 ("drm/i915/cnl: Fix RMW on ddi vswing sequence.")
(which is also commit 33b92c1e1f27 in Linus' tree)

from the drm-misc tree.

I fixed it up (I just used the version from Linus' tree) and can carry the
fix as necessary. This is now fixed as far as linux-next is concerned,
but any non trivial conflicts should be mentioned to your upstream
maintainer when your tree is submitted for merging.  You may also want
to consider cooperating with the maintainer of the conflicting tree to
minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the drm-misc tree with Linus' tree

2017-07-18 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/i915/i915_reg.h

between commit:

  c379b897ba1a ("drm/i915/cnl: Fix the CURSOR_COEFF_MASK used in DDI Vswing 
Programming")

from Linus' tree and commit:

  5a8dd2af31a7 ("drm/i915/cnl: Fix RMW on ddi vswing sequence.")
(which is also commit 33b92c1e1f27 in Linus' tree)

from the drm-misc tree.

I fixed it up (I just used the version from Linus' tree) and can carry the
fix as necessary. This is now fixed as far as linux-next is concerned,
but any non trivial conflicts should be mentioned to your upstream
maintainer when your tree is submitted for merging.  You may also want
to consider cooperating with the maintainer of the conflicting tree to
minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the drm-misc tree with Linus' tree

2016-09-22 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_crtc.c

between commit:

  6f00975c6190 ("drm: Reject page_flip for !DRIVER_MODESET")

from Linus' tree and commit:

  43968d7b806d ("drm: Extract drm_plane.[hc]")

from the drm-misc tree.

I fixed it up (the latter incorporated the former, so I just used the
latter) and can carry the fix as necessary. This is now fixed as far as
linux-next is concerned, but any non trivial conflicts should be mentioned
to your upstream maintainer when your tree is submitted for merging.
You may also want to consider cooperating with the maintainer of the
conflicting tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the drm-misc tree with Linus' tree

2016-09-22 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_crtc.c

between commit:

  6f00975c6190 ("drm: Reject page_flip for !DRIVER_MODESET")

from Linus' tree and commit:

  43968d7b806d ("drm: Extract drm_plane.[hc]")

from the drm-misc tree.

I fixed it up (the latter incorporated the former, so I just used the
latter) and can carry the fix as necessary. This is now fixed as far as
linux-next is concerned, but any non trivial conflicts should be mentioned
to your upstream maintainer when your tree is submitted for merging.
You may also want to consider cooperating with the maintainer of the
conflicting tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the drm-misc tree with Linus' tree

2016-06-06 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  Documentation/DocBook/device-drivers.tmpl

between commit:

  eae1760fc838 ("doc: update/fixup dma-buf related DocBook")

from Linus' tree and commit:

  ddac4b5a6c08 ("Documentation: add fence-array to kernel DocBook")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc Documentation/DocBook/device-drivers.tmpl
index 8c68768ebee5,5744ec7d2d30..
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@@ -128,44 -128,18 +128,46 @@@ X!Edrivers/base/interface.
  !Edrivers/base/platform.c
  !Edrivers/base/bus.c
   
 - Device Drivers DMA Management
 + 
 +   Buffer Sharing and Synchronization
 +   
 + The dma-buf subsystem provides the framework for sharing buffers
 + for hardware (DMA) access across multiple device drivers and
 + subsystems, and for synchronizing asynchronous hardware access.
 +   
 +   
 + This is used, for example, by drm "prime" multi-GPU support, but
 + is of course not limited to GPU use cases.
 +   
 +   
 + The three main components of this are: (1) dma-buf, representing
 + a sg_table and exposed to userspace as a file descriptor to allow
 + passing between devices, (2) fence, which provides a mechanism
 + to signal when one device as finished access, and (3) reservation,
 + which manages the shared or exclusive fence(s) associated with
 + the buffer.
 +   
 +   dma-buf
  !Edrivers/dma-buf/dma-buf.c
 +!Iinclude/linux/dma-buf.h
 +   
 +   reservation
 +!Pdrivers/dma-buf/reservation.c Reservation Object Overview
 +!Edrivers/dma-buf/reservation.c
 +!Iinclude/linux/reservation.h
 +   
 +   fence
  !Edrivers/dma-buf/fence.c
 -!Edrivers/dma-buf/seqno-fence.c
 -!Edrivers/dma-buf/fence-array.c
  !Iinclude/linux/fence.h
 +!Edrivers/dma-buf/seqno-fence.c
  !Iinclude/linux/seqno-fence.h
++!Edrivers/dma-buf/fence-array.c
+ !Iinclude/linux/fence-array.h
 -!Edrivers/dma-buf/reservation.c
 -!Iinclude/linux/reservation.h
  !Edrivers/dma-buf/sync_file.c
  !Iinclude/linux/sync_file.h
 +   
 + 
 + Device Drivers DMA Management
  !Edrivers/base/dma-coherent.c
  !Edrivers/base/dma-mapping.c
   


linux-next: manual merge of the drm-misc tree with Linus' tree

2016-06-06 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  Documentation/DocBook/device-drivers.tmpl

between commit:

  eae1760fc838 ("doc: update/fixup dma-buf related DocBook")

from Linus' tree and commit:

  ddac4b5a6c08 ("Documentation: add fence-array to kernel DocBook")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc Documentation/DocBook/device-drivers.tmpl
index 8c68768ebee5,5744ec7d2d30..
--- a/Documentation/DocBook/device-drivers.tmpl
+++ b/Documentation/DocBook/device-drivers.tmpl
@@@ -128,44 -128,18 +128,46 @@@ X!Edrivers/base/interface.
  !Edrivers/base/platform.c
  !Edrivers/base/bus.c
   
 - Device Drivers DMA Management
 + 
 +   Buffer Sharing and Synchronization
 +   
 + The dma-buf subsystem provides the framework for sharing buffers
 + for hardware (DMA) access across multiple device drivers and
 + subsystems, and for synchronizing asynchronous hardware access.
 +   
 +   
 + This is used, for example, by drm "prime" multi-GPU support, but
 + is of course not limited to GPU use cases.
 +   
 +   
 + The three main components of this are: (1) dma-buf, representing
 + a sg_table and exposed to userspace as a file descriptor to allow
 + passing between devices, (2) fence, which provides a mechanism
 + to signal when one device as finished access, and (3) reservation,
 + which manages the shared or exclusive fence(s) associated with
 + the buffer.
 +   
 +   dma-buf
  !Edrivers/dma-buf/dma-buf.c
 +!Iinclude/linux/dma-buf.h
 +   
 +   reservation
 +!Pdrivers/dma-buf/reservation.c Reservation Object Overview
 +!Edrivers/dma-buf/reservation.c
 +!Iinclude/linux/reservation.h
 +   
 +   fence
  !Edrivers/dma-buf/fence.c
 -!Edrivers/dma-buf/seqno-fence.c
 -!Edrivers/dma-buf/fence-array.c
  !Iinclude/linux/fence.h
 +!Edrivers/dma-buf/seqno-fence.c
  !Iinclude/linux/seqno-fence.h
++!Edrivers/dma-buf/fence-array.c
+ !Iinclude/linux/fence-array.h
 -!Edrivers/dma-buf/reservation.c
 -!Iinclude/linux/reservation.h
  !Edrivers/dma-buf/sync_file.c
  !Iinclude/linux/sync_file.h
 +   
 + 
 + Device Drivers DMA Management
  !Edrivers/base/dma-coherent.c
  !Edrivers/base/dma-mapping.c
   


linux-next: manual merge of the drm-misc tree with Linus' tree

2016-03-30 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

between commit:

  257bf15a4b97 ("drm/amdgpu: add slap cache for sync objects as well")

from Linus' tree and commit:

  44debe7a123c ("vgacon: dummy implementation for vgacon_text_force")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index f1e17d60055a,fba20bd59cfa..
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@@ -555,8 -539,6 +555,7 @@@ static struct pci_driver amdgpu_kms_pci
  
  static int __init amdgpu_init(void)
  {
 +  amdgpu_sync_init();
- #ifdef CONFIG_VGA_CONSOLE
if (vgacon_text_force()) {
DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
return -EINVAL;


linux-next: manual merge of the drm-misc tree with Linus' tree

2016-03-30 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

between commit:

  257bf15a4b97 ("drm/amdgpu: add slap cache for sync objects as well")

from Linus' tree and commit:

  44debe7a123c ("vgacon: dummy implementation for vgacon_text_force")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index f1e17d60055a,fba20bd59cfa..
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@@ -555,8 -539,6 +555,7 @@@ static struct pci_driver amdgpu_kms_pci
  
  static int __init amdgpu_init(void)
  {
 +  amdgpu_sync_init();
- #ifdef CONFIG_VGA_CONSOLE
if (vgacon_text_force()) {
DRM_ERROR("VGACON disables amdgpu kernel modesetting.\n");
return -EINVAL;


linux-next: manual merge of the drm-misc tree with Linus' tree

2016-03-29 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  include/drm/drm_crtc.h

between commit:

  5fff80bbdb6b ("drm/atomic: Allow for holes in connector state, v2.")

from Linus' tree and commit:

  6c87e5c3ec6d ("drm: Rename drm_connector_unplug_all() to 
drm_connector_unregister_all()")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/drm/drm_crtc.h
index e0170bf80bb0,12f2bd4cf38a..
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@@ -2254,13 -2252,9 +2254,13 @@@ int drm_connector_register(struct drm_c
  void drm_connector_unregister(struct drm_connector *connector);
  
  extern void drm_connector_cleanup(struct drm_connector *connector);
 -extern unsigned int drm_connector_index(struct drm_connector *connector);
 +static inline unsigned drm_connector_index(struct drm_connector *connector)
 +{
 +  return connector->connector_id;
 +}
 +
- /* helper to unplug all connectors from sysfs for device */
- extern void drm_connector_unplug_all(struct drm_device *dev);
+ /* helper to unregister all connectors from sysfs for device */
+ extern void drm_connector_unregister_all(struct drm_device *dev);
  
  extern int drm_bridge_add(struct drm_bridge *bridge);
  extern void drm_bridge_remove(struct drm_bridge *bridge);


linux-next: manual merge of the drm-misc tree with Linus' tree

2016-03-29 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  include/drm/drm_crtc.h

between commit:

  5fff80bbdb6b ("drm/atomic: Allow for holes in connector state, v2.")

from Linus' tree and commit:

  6c87e5c3ec6d ("drm: Rename drm_connector_unplug_all() to 
drm_connector_unregister_all()")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/drm/drm_crtc.h
index e0170bf80bb0,12f2bd4cf38a..
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@@ -2254,13 -2252,9 +2254,13 @@@ int drm_connector_register(struct drm_c
  void drm_connector_unregister(struct drm_connector *connector);
  
  extern void drm_connector_cleanup(struct drm_connector *connector);
 -extern unsigned int drm_connector_index(struct drm_connector *connector);
 +static inline unsigned drm_connector_index(struct drm_connector *connector)
 +{
 +  return connector->connector_id;
 +}
 +
- /* helper to unplug all connectors from sysfs for device */
- extern void drm_connector_unplug_all(struct drm_device *dev);
+ /* helper to unregister all connectors from sysfs for device */
+ extern void drm_connector_unregister_all(struct drm_device *dev);
  
  extern int drm_bridge_add(struct drm_bridge *bridge);
  extern void drm_bridge_remove(struct drm_bridge *bridge);


linux-next: manual merge of the drm-misc tree with Linus' tree

2015-12-15 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got conflicts in:

  drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
  drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
  drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

between commit:

  8fbf9d92a7bc ("drm/vmwgfx: Implement the cursor_set2 callback v2")

from Linus' tree and commit:

  d7955fcff889 ("drm/vmwgfx: Constify function pointer structs")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index 78693a0a598c,2def684e61a4..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@@ -294,8 -294,8 +294,8 @@@ static int vmw_ldu_crtc_set_config(stru
return vmw_ldu_commit_list(dev_priv);
  }
  
- static struct drm_crtc_funcs vmw_legacy_crtc_funcs = {
+ static const struct drm_crtc_funcs vmw_legacy_crtc_funcs = {
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_ldu_crtc_destroy,
diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 7ba5a00b3b68,ecac70af032a..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@@ -530,8 -530,8 +530,8 @@@ out_no_fence
return ret;
  }
  
- static struct drm_crtc_funcs vmw_screen_object_crtc_funcs = {
+ static const struct drm_crtc_funcs vmw_screen_object_crtc_funcs = {
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_sou_crtc_destroy,
diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index 58c38e7723d8,87fc00af8d28..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@@ -1040,8 -1040,8 +1040,8 @@@ out_finish
  /*
   *  Screen Target CRTC dispatch table
   */
- static struct drm_crtc_funcs vmw_stdu_crtc_funcs = {
+ static const struct drm_crtc_funcs vmw_stdu_crtc_funcs = {
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_stdu_crtc_destroy,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the drm-misc tree with Linus' tree

2015-12-15 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got conflicts in:

  drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
  drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
  drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

between commit:

  8fbf9d92a7bc ("drm/vmwgfx: Implement the cursor_set2 callback v2")

from Linus' tree and commit:

  d7955fcff889 ("drm/vmwgfx: Constify function pointer structs")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index 78693a0a598c,2def684e61a4..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@@ -294,8 -294,8 +294,8 @@@ static int vmw_ldu_crtc_set_config(stru
return vmw_ldu_commit_list(dev_priv);
  }
  
- static struct drm_crtc_funcs vmw_legacy_crtc_funcs = {
+ static const struct drm_crtc_funcs vmw_legacy_crtc_funcs = {
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_ldu_crtc_destroy,
diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 7ba5a00b3b68,ecac70af032a..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@@ -530,8 -530,8 +530,8 @@@ out_no_fence
return ret;
  }
  
- static struct drm_crtc_funcs vmw_screen_object_crtc_funcs = {
+ static const struct drm_crtc_funcs vmw_screen_object_crtc_funcs = {
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_sou_crtc_destroy,
diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index 58c38e7723d8,87fc00af8d28..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@@ -1040,8 -1040,8 +1040,8 @@@ out_finish
  /*
   *  Screen Target CRTC dispatch table
   */
- static struct drm_crtc_funcs vmw_stdu_crtc_funcs = {
+ static const struct drm_crtc_funcs vmw_stdu_crtc_funcs = {
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_stdu_crtc_destroy,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: manual merge of the drm-misc tree with Linus' tree

2015-12-13 Thread Thomas Hellstrom
On 12/14/2015 02:12 AM, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the drm-misc tree got conflicts in:
>
>   drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
>   drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
>   drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
>
> between commit:
>
>   8fbf9d92a7bc ("drm/vmwgfx: Implement the cursor_set2 callback v2")
>
> from Linus' tree and commit:
>
>   f80de66eca65 ("drm/vmwgfx: Drop dummy save/restore hooks")
>
> from the drm-misc tree.
>
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
>
FWIW, the fix looks correct to me.

/Thomas

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the drm-misc tree with Linus' tree

2015-12-13 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got conflicts in:

  drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
  drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
  drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

between commit:

  8fbf9d92a7bc ("drm/vmwgfx: Implement the cursor_set2 callback v2")

from Linus' tree and commit:

  f80de66eca65 ("drm/vmwgfx: Drop dummy save/restore hooks")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index 52caecb4502e,2aff5e51d926..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@@ -295,9 -295,7 +295,7 @@@ static int vmw_ldu_crtc_set_config(stru
  }
  
  static struct drm_crtc_funcs vmw_legacy_crtc_funcs = {
-   .save = vmw_du_crtc_save,
-   .restore = vmw_du_crtc_restore,
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_ldu_crtc_destroy,
diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 13926ff192e3,6bb7af37934a..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@@ -531,9 -531,7 +531,7 @@@ out_no_fence
  }
  
  static struct drm_crtc_funcs vmw_screen_object_crtc_funcs = {
-   .save = vmw_du_crtc_save,
-   .restore = vmw_du_crtc_restore,
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_sou_crtc_destroy,
diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index f823fc3efed7,45e72c2f15cd..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@@ -1041,9 -1041,7 +1041,7 @@@ out_finish
   *  Screen Target CRTC dispatch table
   */
  static struct drm_crtc_funcs vmw_stdu_crtc_funcs = {
-   .save = vmw_du_crtc_save,
-   .restore = vmw_du_crtc_restore,
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_stdu_crtc_destroy,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the drm-misc tree with Linus' tree

2015-12-13 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got conflicts in:

  drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
  drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
  drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

between commit:

  8fbf9d92a7bc ("drm/vmwgfx: Implement the cursor_set2 callback v2")

from Linus' tree and commit:

  f80de66eca65 ("drm/vmwgfx: Drop dummy save/restore hooks")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index 52caecb4502e,2aff5e51d926..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@@ -295,9 -295,7 +295,7 @@@ static int vmw_ldu_crtc_set_config(stru
  }
  
  static struct drm_crtc_funcs vmw_legacy_crtc_funcs = {
-   .save = vmw_du_crtc_save,
-   .restore = vmw_du_crtc_restore,
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_ldu_crtc_destroy,
diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 13926ff192e3,6bb7af37934a..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@@ -531,9 -531,7 +531,7 @@@ out_no_fence
  }
  
  static struct drm_crtc_funcs vmw_screen_object_crtc_funcs = {
-   .save = vmw_du_crtc_save,
-   .restore = vmw_du_crtc_restore,
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_sou_crtc_destroy,
diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index f823fc3efed7,45e72c2f15cd..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@@ -1041,9 -1041,7 +1041,7 @@@ out_finish
   *  Screen Target CRTC dispatch table
   */
  static struct drm_crtc_funcs vmw_stdu_crtc_funcs = {
-   .save = vmw_du_crtc_save,
-   .restore = vmw_du_crtc_restore,
 -  .cursor_set = vmw_du_crtc_cursor_set,
 +  .cursor_set2 = vmw_du_crtc_cursor_set2,
.cursor_move = vmw_du_crtc_cursor_move,
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_stdu_crtc_destroy,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: linux-next: manual merge of the drm-misc tree with Linus' tree

2015-12-13 Thread Thomas Hellstrom
On 12/14/2015 02:12 AM, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the drm-misc tree got conflicts in:
>
>   drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
>   drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
>   drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
>
> between commit:
>
>   8fbf9d92a7bc ("drm/vmwgfx: Implement the cursor_set2 callback v2")
>
> from Linus' tree and commit:
>
>   f80de66eca65 ("drm/vmwgfx: Drop dummy save/restore hooks")
>
> from the drm-misc tree.
>
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
>
FWIW, the fix looks correct to me.

/Thomas

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the drm-misc tree with Linus' tree

2015-09-11 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_dp_helper.c

between commits:

  79a2b161c12a ("drm/dp: Define AUX_RETRY_INTERVAL as 500 us")
  4efa83c8c786 ("drm/dp: Adjust i2c-over-aux retry count based on message size 
and i2c bus speed")
  f36203be608a ("drm/dp: Add dp_aux_i2c_speed_khz module param to set the 
assume i2c bus speed")

from Linus' tree and commit:

  68ec2a2a2481 ("drm/dp: Use I2C_WRITE_STATUS_UPDATE to drain partial I2C_WRITE 
requests")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/drm_dp_helper.c
index 291734e87fca,5a55d905b8ee..
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@@ -424,90 -422,19 +424,103 @@@ static u32 drm_dp_i2c_functionality(str
   I2C_FUNC_10BIT_ADDR;
  }
  
 +#define AUX_PRECHARGE_LEN 10 /* 10 to 16 */
 +#define AUX_SYNC_LEN (16 + 4) /* preamble + AUX_SYNC_END */
 +#define AUX_STOP_LEN 4
 +#define AUX_CMD_LEN 4
 +#define AUX_ADDRESS_LEN 20
 +#define AUX_REPLY_PAD_LEN 4
 +#define AUX_LENGTH_LEN 8
 +
 +/*
 + * Calculate the duration of the AUX request/reply in usec. Gives the
 + * "best" case estimate, ie. successful while as short as possible.
 + */
 +static int drm_dp_aux_req_duration(const struct drm_dp_aux_msg *msg)
 +{
 +  int len = AUX_PRECHARGE_LEN + AUX_SYNC_LEN + AUX_STOP_LEN +
 +  AUX_CMD_LEN + AUX_ADDRESS_LEN + AUX_LENGTH_LEN;
 +
 +  if ((msg->request & DP_AUX_I2C_READ) == 0)
 +  len += msg->size * 8;
 +
 +  return len;
 +}
 +
 +static int drm_dp_aux_reply_duration(const struct drm_dp_aux_msg *msg)
 +{
 +  int len = AUX_PRECHARGE_LEN + AUX_SYNC_LEN + AUX_STOP_LEN +
 +  AUX_CMD_LEN + AUX_REPLY_PAD_LEN;
 +
 +  /*
 +   * For read we expect what was asked. For writes there will
 +   * be 0 or 1 data bytes. Assume 0 for the "best" case.
 +   */
 +  if (msg->request & DP_AUX_I2C_READ)
 +  len += msg->size * 8;
 +
 +  return len;
 +}
 +
 +#define I2C_START_LEN 1
 +#define I2C_STOP_LEN 1
 +#define I2C_ADDR_LEN 9 /* ADDRESS + R/W + ACK/NACK */
 +#define I2C_DATA_LEN 9 /* DATA + ACK/NACK */
 +
 +/*
 + * Calculate the length of the i2c transfer in usec, assuming
 + * the i2c bus speed is as specified. Gives the the "worst"
 + * case estimate, ie. successful while as long as possible.
 + * Doesn't account the the "MOT" bit, and instead assumes each
 + * message includes a START, ADDRESS and STOP. Neither does it
 + * account for additional random variables such as clock stretching.
 + */
 +static int drm_dp_i2c_msg_duration(const struct drm_dp_aux_msg *msg,
 + int i2c_speed_khz)
 +{
 +  /* AUX bitrate is 1MHz, i2c bitrate as specified */
 +  return DIV_ROUND_UP((I2C_START_LEN + I2C_ADDR_LEN +
 +   msg->size * I2C_DATA_LEN +
 +   I2C_STOP_LEN) * 1000, i2c_speed_khz);
 +}
 +
 +/*
 + * Deterine how many retries should be attempted to successfully transfer
 + * the specified message, based on the estimated durations of the
 + * i2c and AUX transfers.
 + */
 +static int drm_dp_i2c_retry_count(const struct drm_dp_aux_msg *msg,
 +int i2c_speed_khz)
 +{
 +  int aux_time_us = drm_dp_aux_req_duration(msg) +
 +  drm_dp_aux_reply_duration(msg);
 +  int i2c_time_us = drm_dp_i2c_msg_duration(msg, i2c_speed_khz);
 +
 +  return DIV_ROUND_UP(i2c_time_us, aux_time_us + AUX_RETRY_INTERVAL);
 +}
 +
 +/*
 + * FIXME currently assumes 10 kHz as some real world devices seem
 + * to require it. We should query/set the speed via DPCD if supported.
 + */
 +static int dp_aux_i2c_speed_khz __read_mostly = 10;
 +module_param_unsafe(dp_aux_i2c_speed_khz, int, 0644);
 +MODULE_PARM_DESC(dp_aux_i2c_speed_khz,
 +   "Assumed speed of the i2c bus in kHz, (1-400, default 10)");
 +
+ static void drm_dp_i2c_msg_write_status_update(struct drm_dp_aux_msg *msg)
+ {
+   /*
+* In case of i2c defer or short i2c ack reply to a write,
+* we need to switch to WRITE_STATUS_UPDATE to drain the
+* rest of the message
+*/
+   if ((msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_I2C_WRITE) {
+   msg->request &= DP_AUX_I2C_MOT;
+   msg->request |= DP_AUX_I2C_WRITE_STATUS_UPDATE;
+   }
+ }
+ 
  /*
   * Transfer a single I2C-over-AUX message and handle various error conditions,
   * retrying the transaction as appropriate.  It is assumed that the
@@@ -595,7 -521,8 +610,8 @@@ static int drm_dp_i2c_do_msg(struct drm
aux->i2c_defer_count++;
if (defer_i2c < 7)
defer_i2c++;
 -  usleep_range(400, 500);
 +  usleep_range(AUX_RETRY_INTERVAL, 

linux-next: manual merge of the drm-misc tree with Linus' tree

2015-09-11 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_dp_helper.c

between commits:

  79a2b161c12a ("drm/dp: Define AUX_RETRY_INTERVAL as 500 us")
  4efa83c8c786 ("drm/dp: Adjust i2c-over-aux retry count based on message size 
and i2c bus speed")
  f36203be608a ("drm/dp: Add dp_aux_i2c_speed_khz module param to set the 
assume i2c bus speed")

from Linus' tree and commit:

  68ec2a2a2481 ("drm/dp: Use I2C_WRITE_STATUS_UPDATE to drain partial I2C_WRITE 
requests")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/drm_dp_helper.c
index 291734e87fca,5a55d905b8ee..
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@@ -424,90 -422,19 +424,103 @@@ static u32 drm_dp_i2c_functionality(str
   I2C_FUNC_10BIT_ADDR;
  }
  
 +#define AUX_PRECHARGE_LEN 10 /* 10 to 16 */
 +#define AUX_SYNC_LEN (16 + 4) /* preamble + AUX_SYNC_END */
 +#define AUX_STOP_LEN 4
 +#define AUX_CMD_LEN 4
 +#define AUX_ADDRESS_LEN 20
 +#define AUX_REPLY_PAD_LEN 4
 +#define AUX_LENGTH_LEN 8
 +
 +/*
 + * Calculate the duration of the AUX request/reply in usec. Gives the
 + * "best" case estimate, ie. successful while as short as possible.
 + */
 +static int drm_dp_aux_req_duration(const struct drm_dp_aux_msg *msg)
 +{
 +  int len = AUX_PRECHARGE_LEN + AUX_SYNC_LEN + AUX_STOP_LEN +
 +  AUX_CMD_LEN + AUX_ADDRESS_LEN + AUX_LENGTH_LEN;
 +
 +  if ((msg->request & DP_AUX_I2C_READ) == 0)
 +  len += msg->size * 8;
 +
 +  return len;
 +}
 +
 +static int drm_dp_aux_reply_duration(const struct drm_dp_aux_msg *msg)
 +{
 +  int len = AUX_PRECHARGE_LEN + AUX_SYNC_LEN + AUX_STOP_LEN +
 +  AUX_CMD_LEN + AUX_REPLY_PAD_LEN;
 +
 +  /*
 +   * For read we expect what was asked. For writes there will
 +   * be 0 or 1 data bytes. Assume 0 for the "best" case.
 +   */
 +  if (msg->request & DP_AUX_I2C_READ)
 +  len += msg->size * 8;
 +
 +  return len;
 +}
 +
 +#define I2C_START_LEN 1
 +#define I2C_STOP_LEN 1
 +#define I2C_ADDR_LEN 9 /* ADDRESS + R/W + ACK/NACK */
 +#define I2C_DATA_LEN 9 /* DATA + ACK/NACK */
 +
 +/*
 + * Calculate the length of the i2c transfer in usec, assuming
 + * the i2c bus speed is as specified. Gives the the "worst"
 + * case estimate, ie. successful while as long as possible.
 + * Doesn't account the the "MOT" bit, and instead assumes each
 + * message includes a START, ADDRESS and STOP. Neither does it
 + * account for additional random variables such as clock stretching.
 + */
 +static int drm_dp_i2c_msg_duration(const struct drm_dp_aux_msg *msg,
 + int i2c_speed_khz)
 +{
 +  /* AUX bitrate is 1MHz, i2c bitrate as specified */
 +  return DIV_ROUND_UP((I2C_START_LEN + I2C_ADDR_LEN +
 +   msg->size * I2C_DATA_LEN +
 +   I2C_STOP_LEN) * 1000, i2c_speed_khz);
 +}
 +
 +/*
 + * Deterine how many retries should be attempted to successfully transfer
 + * the specified message, based on the estimated durations of the
 + * i2c and AUX transfers.
 + */
 +static int drm_dp_i2c_retry_count(const struct drm_dp_aux_msg *msg,
 +int i2c_speed_khz)
 +{
 +  int aux_time_us = drm_dp_aux_req_duration(msg) +
 +  drm_dp_aux_reply_duration(msg);
 +  int i2c_time_us = drm_dp_i2c_msg_duration(msg, i2c_speed_khz);
 +
 +  return DIV_ROUND_UP(i2c_time_us, aux_time_us + AUX_RETRY_INTERVAL);
 +}
 +
 +/*
 + * FIXME currently assumes 10 kHz as some real world devices seem
 + * to require it. We should query/set the speed via DPCD if supported.
 + */
 +static int dp_aux_i2c_speed_khz __read_mostly = 10;
 +module_param_unsafe(dp_aux_i2c_speed_khz, int, 0644);
 +MODULE_PARM_DESC(dp_aux_i2c_speed_khz,
 +   "Assumed speed of the i2c bus in kHz, (1-400, default 10)");
 +
+ static void drm_dp_i2c_msg_write_status_update(struct drm_dp_aux_msg *msg)
+ {
+   /*
+* In case of i2c defer or short i2c ack reply to a write,
+* we need to switch to WRITE_STATUS_UPDATE to drain the
+* rest of the message
+*/
+   if ((msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_I2C_WRITE) {
+   msg->request &= DP_AUX_I2C_MOT;
+   msg->request |= DP_AUX_I2C_WRITE_STATUS_UPDATE;
+   }
+ }
+ 
  /*
   * Transfer a single I2C-over-AUX message and handle various error conditions,
   * retrying the transaction as appropriate.  It is assumed that the
@@@ -595,7 -521,8 +610,8 @@@ static int drm_dp_i2c_do_msg(struct drm
aux->i2c_defer_count++;
if (defer_i2c < 7)
defer_i2c++;
 -  usleep_range(400, 500);
 +  usleep_range(AUX_RETRY_INTERVAL, 

linux-next: manual merge of the drm-misc tree with Linus' tree

2015-08-13 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_irq.c

between commit:

  209e4dbc8dcd ("drm/vblank: Use u32 consistently for vblank counters")

from Linus' tree and commit:

  b90180b057f7 ("drm/irq: More pipe/crtc consistency cleanups")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/drm_irq.c
index ee14324522ce,70919d48f015..
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@@ -74,11 -74,11 +74,11 @@@ module_param_named(vblankoffdelay, drm_
  module_param_named(timestamp_precision_usec, drm_timestamp_precision, int, 
0600);
  module_param_named(timestamp_monotonic, drm_timestamp_monotonic, int, 0600);
  
- static void store_vblank(struct drm_device *dev, int crtc,
+ static void store_vblank(struct drm_device *dev, unsigned int pipe,
 -   unsigned vblank_count_inc,
 +   u32 vblank_count_inc,
 struct timeval *t_vblank)
  {
-   struct drm_vblank_crtc *vblank = >vblank[crtc];
+   struct drm_vblank_crtc *vblank = >vblank[pipe];
u32 tslot;
  
assert_spin_locked(>vblank_time_lock);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the drm-misc tree with Linus' tree

2015-08-13 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_irq.c

between commit:

  209e4dbc8dcd (drm/vblank: Use u32 consistently for vblank counters)

from Linus' tree and commit:

  b90180b057f7 (drm/irq: More pipe/crtc consistency cleanups)

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/drm_irq.c
index ee14324522ce,70919d48f015..
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@@ -74,11 -74,11 +74,11 @@@ module_param_named(vblankoffdelay, drm_
  module_param_named(timestamp_precision_usec, drm_timestamp_precision, int, 
0600);
  module_param_named(timestamp_monotonic, drm_timestamp_monotonic, int, 0600);
  
- static void store_vblank(struct drm_device *dev, int crtc,
+ static void store_vblank(struct drm_device *dev, unsigned int pipe,
 -   unsigned vblank_count_inc,
 +   u32 vblank_count_inc,
 struct timeval *t_vblank)
  {
-   struct drm_vblank_crtc *vblank = dev-vblank[crtc];
+   struct drm_vblank_crtc *vblank = dev-vblank[pipe];
u32 tslot;
  
assert_spin_locked(dev-vblank_time_lock);
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the drm-misc tree with Linus' tree

2015-08-02 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_atomic_helper.c

between commit:

  27667f4744fc ("i915: temporary fix for DP MST docking station NULL pointer 
dereference")

from Linus' tree and commit:

  fc596660dd4e ("drm/atomic: add connectors_changed to separate it from 
mode_changed, v2")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/drm_atomic_helper.c
index 90065c226fe5,0b475fae067d..
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@@ -230,12 -230,10 +230,12 @@@ update_connector_routing(struct drm_ato
}
  
connector_state->best_encoder = new_encoder;
 -  idx = drm_crtc_index(connector_state->crtc);
 +  if (connector_state->crtc) {
 +  idx = drm_crtc_index(connector_state->crtc);
  
 -  crtc_state = state->crtc_states[idx];
 -  crtc_state->connectors_changed = true;
 +  crtc_state = state->crtc_states[idx];
-   crtc_state->mode_changed = true;
++  crtc_state->connectors_changed = true;
 +  }
  
DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] using [ENCODER:%d:%s] on 
[CRTC:%d]\n",
 connector->base.id,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the drm-misc tree with Linus' tree

2015-08-02 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_atomic_helper.c

between commit:

  27667f4744fc (i915: temporary fix for DP MST docking station NULL pointer 
dereference)

from Linus' tree and commit:

  fc596660dd4e (drm/atomic: add connectors_changed to separate it from 
mode_changed, v2)

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/drm_atomic_helper.c
index 90065c226fe5,0b475fae067d..
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@@ -230,12 -230,10 +230,12 @@@ update_connector_routing(struct drm_ato
}
  
connector_state-best_encoder = new_encoder;
 -  idx = drm_crtc_index(connector_state-crtc);
 +  if (connector_state-crtc) {
 +  idx = drm_crtc_index(connector_state-crtc);
  
 -  crtc_state = state-crtc_states[idx];
 -  crtc_state-connectors_changed = true;
 +  crtc_state = state-crtc_states[idx];
-   crtc_state-mode_changed = true;
++  crtc_state-connectors_changed = true;
 +  }
  
DRM_DEBUG_ATOMIC([CONNECTOR:%d:%s] using [ENCODER:%d:%s] on 
[CRTC:%d]\n,
 connector-base.id,
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the drm-misc tree with Linus' tree

2015-07-29 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_crtc.c

between commit:

  5677d67ae394 ("drm: Stop resetting connector state to unknown")

from Linus' tree and commit:

  1c473be11958 ("drm: Fixup locking WARNINGs in drm_mode_config_reset")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/drm_crtc.c
index c91c18b2b1d4,7d02e32b4e94..
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@@ -5273,9 -5273,14 +5273,11 @@@ void drm_mode_config_reset(struct drm_d
if (encoder->funcs->reset)
encoder->funcs->reset(encoder);
  
+   mutex_lock(>mode_config.mutex);
 -  drm_for_each_connector(connector, dev) {
 -  connector->status = connector_status_unknown;
 -
 +  drm_for_each_connector(connector, dev)
if (connector->funcs->reset)
connector->funcs->reset(connector);
 -  }
+   mutex_unlock(>mode_config.mutex);
  }
  EXPORT_SYMBOL(drm_mode_config_reset);
  
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the drm-misc tree with Linus' tree

2015-07-29 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/drm_crtc.c

between commit:

  5677d67ae394 (drm: Stop resetting connector state to unknown)

from Linus' tree and commit:

  1c473be11958 (drm: Fixup locking WARNINGs in drm_mode_config_reset)

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/gpu/drm/drm_crtc.c
index c91c18b2b1d4,7d02e32b4e94..
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@@ -5273,9 -5273,14 +5273,11 @@@ void drm_mode_config_reset(struct drm_d
if (encoder-funcs-reset)
encoder-funcs-reset(encoder);
  
+   mutex_lock(dev-mode_config.mutex);
 -  drm_for_each_connector(connector, dev) {
 -  connector-status = connector_status_unknown;
 -
 +  drm_for_each_connector(connector, dev)
if (connector-funcs-reset)
connector-funcs-reset(connector);
 -  }
+   mutex_unlock(dev-mode_config.mutex);
  }
  EXPORT_SYMBOL(drm_mode_config_reset);
  
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/