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

2024-03-03 Thread Stephen Rothwell
Hi all,

FIXME: Add owner of second tree to To:
   Add author(s)/SOB of conflicting commits.

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

  drivers/gpu/drm/xe/xe_exec_queue.c
  drivers/gpu/drm/xe/xe_exec_queue_types.h

between commit:

  eaa367a0317e ("drm/xe/uapi: Remove unused flags")

from Linus' tree and commits:

  25ce7c5063b3 ("drm/xe: Finish refactoring of exec_queue_create")
  f1a9abc0cf31 ("drm/xe/uapi: Remove support for persistent exec_queues")

from the drm 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/xe/xe_exec_queue.c
index 49223026c89f,4bb8f897bf15..
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@@ -306,9 -347,98 +347,13 @@@ static int exec_queue_set_timeslice(str
!xe_hw_engine_timeout_in_range(value, min, max))
return -EINVAL;
  
-   return q->ops->set_timeslice(q, value);
+   if (!create)
+   return q->ops->set_timeslice(q, value);
+ 
+   q->sched_props.timeslice_us = value;
+   return 0;
  }
  
 -static int exec_queue_set_preemption_timeout(struct xe_device *xe,
 -   struct xe_exec_queue *q, u64 value,
 -   bool create)
 -{
 -  u32 min = 0, max = 0;
 -
 -  xe_exec_queue_get_prop_minmax(q->hwe->eclass,
 -XE_EXEC_QUEUE_PREEMPT_TIMEOUT, , 
);
 -
 -  if (xe_exec_queue_enforce_schedule_limit() &&
 -  !xe_hw_engine_timeout_in_range(value, min, max))
 -  return -EINVAL;
 -
 -  if (!create)
 -  return q->ops->set_preempt_timeout(q, value);
 -
 -  q->sched_props.preempt_timeout_us = value;
 -  return 0;
 -}
 -
 -static int exec_queue_set_job_timeout(struct xe_device *xe, struct 
xe_exec_queue *q,
 -u64 value, bool create)
 -{
 -  u32 min = 0, max = 0;
 -
 -  if (XE_IOCTL_DBG(xe, !create))
 -  return -EINVAL;
 -
 -  xe_exec_queue_get_prop_minmax(q->hwe->eclass,
 -XE_EXEC_QUEUE_JOB_TIMEOUT, , );
 -
 -  if (xe_exec_queue_enforce_schedule_limit() &&
 -  !xe_hw_engine_timeout_in_range(value, min, max))
 -  return -EINVAL;
 -
 -  q->sched_props.job_timeout_ms = value;
 -
 -  return 0;
 -}
 -
 -static int exec_queue_set_acc_trigger(struct xe_device *xe, struct 
xe_exec_queue *q,
 -u64 value, bool create)
 -{
 -  if (XE_IOCTL_DBG(xe, !create))
 -  return -EINVAL;
 -
 -  if (XE_IOCTL_DBG(xe, !xe->info.has_usm))
 -  return -EINVAL;
 -
 -  q->usm.acc_trigger = value;
 -
 -  return 0;
 -}
 -
 -static int exec_queue_set_acc_notify(struct xe_device *xe, struct 
xe_exec_queue *q,
 -   u64 value, bool create)
 -{
 -  if (XE_IOCTL_DBG(xe, !create))
 -  return -EINVAL;
 -
 -  if (XE_IOCTL_DBG(xe, !xe->info.has_usm))
 -  return -EINVAL;
 -
 -  q->usm.acc_notify = value;
 -
 -  return 0;
 -}
 -
 -static int exec_queue_set_acc_granularity(struct xe_device *xe, struct 
xe_exec_queue *q,
 -u64 value, bool create)
 -{
 -  if (XE_IOCTL_DBG(xe, !create))
 -  return -EINVAL;
 -
 -  if (XE_IOCTL_DBG(xe, !xe->info.has_usm))
 -  return -EINVAL;
 -
 -  if (value > DRM_XE_ACC_GRANULARITY_64M)
 -  return -EINVAL;
 -
 -  q->usm.acc_granularity = value;
 -
 -  return 0;
 -}
 -
  typedef int (*xe_exec_queue_set_property_fn)(struct xe_device *xe,
 struct xe_exec_queue *q,
 u64 value, bool create);
diff --cc drivers/gpu/drm/xe/xe_exec_queue_types.h
index 36f4901d8d7e,c40240e88068..
--- a/drivers/gpu/drm/xe/xe_exec_queue_types.h
+++ b/drivers/gpu/drm/xe/xe_exec_queue_types.h


pgpb1cvuqnp5E.pgp
Description: OpenPGP digital signature


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

2024-03-03 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/xe/xe_bo.c
  drivers/gpu/drm/xe/xe_bo.h

between commits:

  a09946a9a903 ("drm/xe/xe_bo_move: Enhance xe_bo_move trace")
  8188cae3cc3d ("drm/xe/xe_trace: Add move_lacks_source detail to xe_bo_move 
trace")

from Linus' tree and commit:

  a0df2cc858c3 ("drm/xe/xe_bo_move: Enhance xe_bo_move trace")

from the drm tree.

I fixed it up (I just used the former) 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


pgp85cmnXwQF0.pgp
Description: OpenPGP digital signature


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

2024-01-07 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

between commit:

  9cdef4f72037 ("drm/amd/display: pbn_div need be updated for hotplug event")

from Linus' tree and commit:

  191dc43935d1 ("drm/dp_mst: Store the MST PBN divider value in fixed point 
format")

from the drm 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/amd/display/amdgpu_dm/amdgpu_dm.c
index 73dd4bc870dc,54861136dafd..
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@@ -6916,7 -7007,8 +7009,7 @@@ static int dm_encoder_helper_atomic_che
if (IS_ERR(mst_state))
return PTR_ERR(mst_state);
  
-   mst_state->pbn_div = 
dm_mst_get_pbn_divider(aconnector->mst_root->dc_link);
 -  if (!mst_state->pbn_div.full)
 -  mst_state->pbn_div.full = 
dfixed_const(dm_mst_get_pbn_divider(aconnector->mst_root->dc_link));
++  mst_state->pbn_div.full = 
dfixed_const(dm_mst_get_pbn_divider(aconnector->mst_root->dc_link));
  
if (!state->duplicated) {
int max_bpc = conn_state->max_requested_bpc;


pgp9lNCMbLHEz.pgp
Description: OpenPGP digital signature


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

2023-06-18 Thread Stephen Rothwell
Hi all,

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

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

between commit:

  34e5a54327dc ("Revert "drm/amdgpu: remove TOPDOWN flags when allocating VRAM 
in large bar system"")

from Linus' tree and commit:

  7f6db89418f9 ("drm/amdgpu: dGPU mode placement support memory partition")

from the drm 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_object.c
index a70103ac0026,f76649e523a0..
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@@ -139,8 -149,8 +149,8 @@@ void amdgpu_bo_placement_from_domain(st
places[c].flags = 0;
  
if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED)
-   places[c].lpfn = visible_pfn;
+   places[c].lpfn = min_not_zero(places[c].lpfn, 
visible_pfn);
 -  else if (adev->gmc.real_vram_size != 
adev->gmc.visible_vram_size)
 +  else
places[c].flags |= TTM_PL_FLAG_TOPDOWN;
  
if (flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)


pgpffntsKMy3e.pgp
Description: OpenPGP digital signature


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

2022-11-30 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/i915/gt/intel_gt.c

between commit:

  04aa64375f48 ("drm/i915: fix TLB invalidation for Gen12 video and compute 
engines")

from Linus' tree and commit:

  46c507f03a46 ("drm/i915/gt: Always use MCR functions on multicast registers")

from the drm 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/i915/gt/intel_gt.c
index 7caa3412a244,0325f071046c..
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@@ -1018,16 -1103,17 +1108,22 @@@ static void mmio_invalidate_full(struc
if (!intel_engine_pm_is_awake(engine))
continue;
  
-   rb = get_reg_and_bit(engine, regs == gen8_regs, regs, num);
-   if (!i915_mmio_reg_offset(rb.reg))
-   continue;
- 
-   if (GRAPHICS_VER(i915) == 12 && (engine->class == 
VIDEO_DECODE_CLASS ||
-   engine->class == VIDEO_ENHANCEMENT_CLASS ||
-   engine->class == COMPUTE_CLASS))
-   rb.bit = _MASKED_BIT_ENABLE(rb.bit);
- 
-   intel_uncore_write_fw(uncore, rb.reg, rb.bit);
+   if (GRAPHICS_VER_FULL(i915) >= IP_VER(12, 50)) {
+   intel_gt_mcr_multicast_write_fw(gt,
+   
xehp_regs[engine->class],
+   BIT(engine->instance));
+   } else {
+   rb = get_reg_and_bit(engine, regs == gen8_regs, regs, 
num);
+   if (!i915_mmio_reg_offset(rb.reg))
+   continue;
+ 
++  if (GRAPHICS_VER(i915) == 12 && (engine->class == 
VIDEO_DECODE_CLASS ||
++  engine->class == VIDEO_ENHANCEMENT_CLASS ||
++  engine->class == COMPUTE_CLASS))
++  rb.bit = _MASKED_BIT_ENABLE(rb.bit);
++
+   intel_uncore_write_fw(uncore, rb.reg, rb.bit);
+   }
awake |= engine->mask;
}
  


pgpYISkMQWOss.pgp
Description: OpenPGP digital signature


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

2022-11-29 Thread Geert Uytterhoeven
Hi DRm people,

On Mon, Nov 28, 2022 at 1:02 AM Stephen Rothwell  wrote:
> Today's linux-next merge of the drm tree got a conflict in:
>
>   drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
>
> between commits:
>
>   3cb93f390453 ("drm/amdgpu: fix use-after-free during gpu recovery")
>   b09d6acba1d9 ("drm/amdgpu: handle gang submit before VMID")
>
> from Linus' tree and commits:
>
>   1b2d5eda5ad7 ("drm/amdgpu: move explicit sync check into the CS")
>   1728baa7e4e6 ("drm/amdgpu: use scheduler dependencies for CS")
>   c5093cddf56b ("drm/amdgpu: drop the fence argument from amdgpu_vmid_grab")
>   940ca22b7ea9 ("drm/amdgpu: drop amdgpu_sync from amdgpu_vmid_grab v2")
>   1b2d5eda5ad7 ("drm/amdgpu: move explicit sync check into the CS")
>   1728baa7e4e6 ("drm/amdgpu: use scheduler dependencies for CS")
>
> from the drm 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.

Have you considered merging drm-fixes into drm-next, so not everyone
who consumes your trees needs to resolve the same merge conflicts?

Thanks!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


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

2022-11-27 Thread Stephen Rothwell
Hi all,

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

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

between commits:

  3cb93f390453 ("drm/amdgpu: fix use-after-free during gpu recovery")
  b09d6acba1d9 ("drm/amdgpu: handle gang submit before VMID")

from Linus' tree and commits:

  1b2d5eda5ad7 ("drm/amdgpu: move explicit sync check into the CS")
  1728baa7e4e6 ("drm/amdgpu: use scheduler dependencies for CS")
  c5093cddf56b ("drm/amdgpu: drop the fence argument from amdgpu_vmid_grab")
  940ca22b7ea9 ("drm/amdgpu: drop amdgpu_sync from amdgpu_vmid_grab v2")
  1b2d5eda5ad7 ("drm/amdgpu: move explicit sync check into the CS")
  1728baa7e4e6 ("drm/amdgpu: use scheduler dependencies for CS")

from the drm 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_job.c
index adac650cf544,032651a655f0..
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@@ -166,14 -173,8 +173,12 @@@ static void amdgpu_job_free_cb(struct d
  
drm_sched_job_cleanup(s_job);
  
-   amdgpu_sync_free(>sync);
-   amdgpu_sync_free(>sched_sync);
- 
+   amdgpu_sync_free(>explicit_sync);
 -  dma_fence_put(>hw_fence);
 +  /* only put the hw fence if has embedded fence */
 +  if (!job->hw_fence.ops)
 +  kfree(job);
 +  else
 +  dma_fence_put(>hw_fence);
  }
  
  void amdgpu_job_set_gang_leader(struct amdgpu_job *job,
@@@ -247,30 -242,18 +246,18 @@@ amdgpu_job_prepare_job(struct drm_sched
  {
struct amdgpu_ring *ring = to_amdgpu_ring(s_entity->rq->sched);
struct amdgpu_job *job = to_amdgpu_job(sched_job);
-   struct amdgpu_vm *vm = job->vm;
-   struct dma_fence *fence;
+   struct dma_fence *fence = NULL;
int r;
  
-   fence = amdgpu_sync_get_fence(>sync);
-   if (fence && drm_sched_dependency_optimized(fence, s_entity)) {
-   r = amdgpu_sync_fence(>sched_sync, fence);
-   if (r)
-   DRM_ERROR("Error adding fence (%d)\n", r);
-   }
- 
-   if (!fence && job->gang_submit)
++  if (job->gang_submit)
 +  fence = amdgpu_device_switch_gang(ring->adev, job->gang_submit);
 +
-   while (fence == NULL && vm && !job->vmid) {
-   r = amdgpu_vmid_grab(vm, ring, >sync,
->base.s_fence->finished,
-job);
+   while (!fence && job->vm && !job->vmid) {
+   r = amdgpu_vmid_grab(job->vm, ring, job, );
if (r)
DRM_ERROR("Error getting VM ID (%d)\n", r);
- 
-   fence = amdgpu_sync_get_fence(>sync);
}
  
 -  if (!fence && job->gang_submit)
 -  fence = amdgpu_device_switch_gang(ring->adev, job->gang_submit);
 -
return fence;
  }
  


pgpGNqh6j5zxW.pgp
Description: OpenPGP digital signature


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

2022-11-16 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/rcar-du/Kconfig

between commit:

  a830a1567859 ("drm: rcar-du: Fix Kconfig dependency between RCAR_DU and 
RCAR_MIPI_DSI")

from Linus' tree and commit:

  7a043f978ed1 ("drm: rcar-du: Add RZ/G2L DSI driver")

from the drm 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/rcar-du/Kconfig
index fd2c2eaee26b,f14686549cbe..
--- a/drivers/gpu/drm/rcar-du/Kconfig
+++ b/drivers/gpu/drm/rcar-du/Kconfig
@@@ -41,21 -41,22 +41,27 @@@ config DRM_RCAR_LVD
depends on DRM_RCAR_USE_LVDS
select DRM_KMS_HELPER
select DRM_PANEL
-   select OF_FLATTREE
-   select OF_OVERLAY
  
 -config DRM_RCAR_MIPI_DSI
 -  tristate "R-Car DU MIPI DSI Encoder Support"
 -  depends on DRM && DRM_BRIDGE && OF
 -  select DRM_MIPI_DSI
 +config DRM_RCAR_USE_MIPI_DSI
 +  bool "R-Car DU MIPI DSI Encoder Support"
 +  depends on DRM_BRIDGE && OF
 +  default DRM_RCAR_DU
help
  Enable support for the R-Car Display Unit embedded MIPI DSI encoders.
  
 +config DRM_RCAR_MIPI_DSI
 +  def_tristate DRM_RCAR_DU
 +  depends on DRM_RCAR_USE_MIPI_DSI
 +  select DRM_MIPI_DSI
 +
+ config DRM_RZG2L_MIPI_DSI
+   tristate "RZ/G2L MIPI DSI Encoder Support"
+   depends on DRM_BRIDGE && OF
+   depends on ARCH_RENESAS || COMPILE_TEST
+   select DRM_MIPI_DSI
+   help
+ Enable support for the RZ/G2L Display Unit embedded MIPI DSI encoders.
+ 
  config DRM_RCAR_VSP
bool "R-Car DU VSP Compositor Support" if ARM
default y if ARM64


pgp9dIgy44_1r.pgp
Description: OpenPGP digital signature


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

2022-09-19 Thread Nathan Chancellor
Hi Geert,

On Mon, Sep 19, 2022 at 09:58:01AM +0200, Geert Uytterhoeven wrote:
> Hi Stephen,
> 
> On Mon, Sep 19, 2022 at 3:07 AM Stephen Rothwell  
> wrote:
> > Today's linux-next merge of the drm tree got a conflict in:
> >
> >   drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
> >
> > between commit:
> >
> >   41012d715d5d ("drm/amd/display: Mark dml30's UseMinimumDCFCLK() as 
> > noinline for stack usage")
> >
> > from Linus' tree and commit:
> >
> >   a0f7e7f759cf ("drm/amd/display: fix i386 frame size warning")
> >
> > from the drm 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/display/dc/dml/dcn30/display_mode_vba_30.c
> > index 1cb858dd6ea0,b7fa003ffe06..
> > --- a/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
> > +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
> > @@@ -6610,66 -6497,11 +6497,11 @@@ static double CalculateUrgentLatency
> > return ret;
> >   }
> >
> >  -static void UseMinimumDCFCLK(
> >  +static noinline_for_stack void UseMinimumDCFCLK(
> 
> While this looks like the correct merge resolution, it does mean that
> both stack size mitigations are now applied, and probably one of them
> can be dropped?

Thanks for taking a look! As I note in the commit message of
41012d715d5d:

"Commit a0f7e7f759cf ("drm/amd/display: fix i386 frame size warning")
aimed to address this for i386 but it did not help x86_64.

... The aforementioned change does help reduce UseMinimumDCFCLK()'s
stack usage so it should not be reverted in favor of this change."

While it is possible that 41012d715d5d fixes the warning for both 32-bit
and 64-bit x86 (I did not check), a0f7e7f759cf is still a good change in
my opinion so neither should be reverted.

Cheers,
Nathan

> > struct display_mode_lib *mode_lib,
> > -   int MaxInterDCNTileRepeaters,
> > +   struct vba_vars_st *v,
> > int MaxPrefetchMode,
> > -   double FinalDRAMClockChangeLatency,
> > -   double SREnterPlusExitTime,
> > -   int ReturnBusWidth,
> > -   int RoundTripPingLatencyCycles,
> > -   int ReorderingBytes,
> > -   int PixelChunkSizeInKByte,
> > -   int MetaChunkSize,
> > -   bool GPUVMEnable,
> > -   int GPUVMMaxPageTableLevels,
> > -   bool HostVMEnable,
> > -   int NumberOfActivePlanes,
> > -   double HostVMMinPageSize,
> > -   int HostVMMaxNonCachedPageTableLevels,
> > -   bool DynamicMetadataVMEnabled,
> > -   enum immediate_flip_requirement ImmediateFlipRequirement,
> > -   bool ProgressiveToInterlaceUnitInOPP,
> > -   double 
> > MaxAveragePercentOfIdealSDPPortBWDisplayCanUseInNormalSystemOperation,
> > -   double 
> > PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyPixelMixedWithVMData,
> > -   double 
> > PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyVMDataOnly,
> > -   double 
> > PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyPixelDataOnly,
> > -   int VTotal[],
> > -   int VActive[],
> > -   int DynamicMetadataTransmittedBytes[],
> > -   int DynamicMetadataLinesBeforeActiveRequired[],
> > -   bool Interlace[],
> > -   double RequiredDPPCLK[][2][DC__NUM_DPP__MAX],
> > -   double RequiredDISPCLK[][2],
> > -   double UrgLatency[],
> > -   unsigned int NoOfDPP[][2][DC__NUM_DPP__MAX],
> > -   double ProjectedDCFCLKDeepSleep[][2],
> > -   double MaximumVStartup[][2][DC__NUM_DPP__MAX],
> > -   double TotalVActivePixelBandwidth[][2],
> > -   double TotalVActiveCursorBandwidth[][2],
> > -   double TotalMetaRowBandwidth[][2],
> > -   double TotalDPTERowBandwidth[][2],
> > -   unsigned int TotalNumberOfActiveDPP[][2],
> > -   unsigned int TotalNumberOfDCCActiveDPP[][2],
> > -   int dpte_group_bytes[],
> > -   double PrefetchLinesY[][2][DC__NUM_DPP__MAX],
> > -   double PrefetchLinesC[][2][DC__NUM_DPP__MAX],
> > -   unsigned int 
> > swath_width_luma_ub_all_states[][2][DC__NUM_DPP__MAX],
> > -   unsigned int 
> > swath_width_chroma_ub_all_states[][2][DC__NUM_DPP__MAX],
> > -   int BytePerPixelY[],
> > -   int BytePerPixelC[],
> > -   

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

2022-09-19 Thread Geert Uytterhoeven
Hi Stephen,

On Mon, Sep 19, 2022 at 3:07 AM Stephen Rothwell  wrote:
> Today's linux-next merge of the drm tree got a conflict in:
>
>   drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
>
> between commit:
>
>   41012d715d5d ("drm/amd/display: Mark dml30's UseMinimumDCFCLK() as noinline 
> for stack usage")
>
> from Linus' tree and commit:
>
>   a0f7e7f759cf ("drm/amd/display: fix i386 frame size warning")
>
> from the drm 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/display/dc/dml/dcn30/display_mode_vba_30.c
> index 1cb858dd6ea0,b7fa003ffe06..
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
> @@@ -6610,66 -6497,11 +6497,11 @@@ static double CalculateUrgentLatency
> return ret;
>   }
>
>  -static void UseMinimumDCFCLK(
>  +static noinline_for_stack void UseMinimumDCFCLK(

While this looks like the correct merge resolution, it does mean that
both stack size mitigations are now applied, and probably one of them
can be dropped?

> struct display_mode_lib *mode_lib,
> -   int MaxInterDCNTileRepeaters,
> +   struct vba_vars_st *v,
> int MaxPrefetchMode,
> -   double FinalDRAMClockChangeLatency,
> -   double SREnterPlusExitTime,
> -   int ReturnBusWidth,
> -   int RoundTripPingLatencyCycles,
> -   int ReorderingBytes,
> -   int PixelChunkSizeInKByte,
> -   int MetaChunkSize,
> -   bool GPUVMEnable,
> -   int GPUVMMaxPageTableLevels,
> -   bool HostVMEnable,
> -   int NumberOfActivePlanes,
> -   double HostVMMinPageSize,
> -   int HostVMMaxNonCachedPageTableLevels,
> -   bool DynamicMetadataVMEnabled,
> -   enum immediate_flip_requirement ImmediateFlipRequirement,
> -   bool ProgressiveToInterlaceUnitInOPP,
> -   double 
> MaxAveragePercentOfIdealSDPPortBWDisplayCanUseInNormalSystemOperation,
> -   double 
> PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyPixelMixedWithVMData,
> -   double 
> PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyVMDataOnly,
> -   double 
> PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyPixelDataOnly,
> -   int VTotal[],
> -   int VActive[],
> -   int DynamicMetadataTransmittedBytes[],
> -   int DynamicMetadataLinesBeforeActiveRequired[],
> -   bool Interlace[],
> -   double RequiredDPPCLK[][2][DC__NUM_DPP__MAX],
> -   double RequiredDISPCLK[][2],
> -   double UrgLatency[],
> -   unsigned int NoOfDPP[][2][DC__NUM_DPP__MAX],
> -   double ProjectedDCFCLKDeepSleep[][2],
> -   double MaximumVStartup[][2][DC__NUM_DPP__MAX],
> -   double TotalVActivePixelBandwidth[][2],
> -   double TotalVActiveCursorBandwidth[][2],
> -   double TotalMetaRowBandwidth[][2],
> -   double TotalDPTERowBandwidth[][2],
> -   unsigned int TotalNumberOfActiveDPP[][2],
> -   unsigned int TotalNumberOfDCCActiveDPP[][2],
> -   int dpte_group_bytes[],
> -   double PrefetchLinesY[][2][DC__NUM_DPP__MAX],
> -   double PrefetchLinesC[][2][DC__NUM_DPP__MAX],
> -   unsigned int 
> swath_width_luma_ub_all_states[][2][DC__NUM_DPP__MAX],
> -   unsigned int 
> swath_width_chroma_ub_all_states[][2][DC__NUM_DPP__MAX],
> -   int BytePerPixelY[],
> -   int BytePerPixelC[],
> -   int HTotal[],
> -   double PixelClock[],
> -   double PDEAndMetaPTEBytesPerFrame[][2][DC__NUM_DPP__MAX],
> -   double DPTEBytesPerRow[][2][DC__NUM_DPP__MAX],
> -   double MetaRowBytes[][2][DC__NUM_DPP__MAX],
> -   bool DynamicMetadataEnable[],
> -   double VActivePixelBandwidth[][2][DC__NUM_DPP__MAX],
> -   double VActiveCursorBandwidth[][2][DC__NUM_DPP__MAX],
> -   double ReadBandwidthLuma[],
> -   double ReadBandwidthChroma[],
> -   double DCFCLKPerState[],
> -   double DCFCLKState[][2])
> +   int ReorderingBytes)
>   {
> double   NormalEfficiency = 0;
> double   PTEEfficiency = 0;

Gr{oetje,eeting}s,

Geert

--
Geert 

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

2022-09-18 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c

between commit:

  41012d715d5d ("drm/amd/display: Mark dml30's UseMinimumDCFCLK() as noinline 
for stack usage")

from Linus' tree and commit:

  a0f7e7f759cf ("drm/amd/display: fix i386 frame size warning")

from the drm 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/display/dc/dml/dcn30/display_mode_vba_30.c
index 1cb858dd6ea0,b7fa003ffe06..
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
@@@ -6610,66 -6497,11 +6497,11 @@@ static double CalculateUrgentLatency
return ret;
  }
  
 -static void UseMinimumDCFCLK(
 +static noinline_for_stack void UseMinimumDCFCLK(
struct display_mode_lib *mode_lib,
-   int MaxInterDCNTileRepeaters,
+   struct vba_vars_st *v,
int MaxPrefetchMode,
-   double FinalDRAMClockChangeLatency,
-   double SREnterPlusExitTime,
-   int ReturnBusWidth,
-   int RoundTripPingLatencyCycles,
-   int ReorderingBytes,
-   int PixelChunkSizeInKByte,
-   int MetaChunkSize,
-   bool GPUVMEnable,
-   int GPUVMMaxPageTableLevels,
-   bool HostVMEnable,
-   int NumberOfActivePlanes,
-   double HostVMMinPageSize,
-   int HostVMMaxNonCachedPageTableLevels,
-   bool DynamicMetadataVMEnabled,
-   enum immediate_flip_requirement ImmediateFlipRequirement,
-   bool ProgressiveToInterlaceUnitInOPP,
-   double 
MaxAveragePercentOfIdealSDPPortBWDisplayCanUseInNormalSystemOperation,
-   double 
PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyPixelMixedWithVMData,
-   double 
PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyVMDataOnly,
-   double 
PercentOfIdealDRAMFabricAndSDPPortBWReceivedAfterUrgLatencyPixelDataOnly,
-   int VTotal[],
-   int VActive[],
-   int DynamicMetadataTransmittedBytes[],
-   int DynamicMetadataLinesBeforeActiveRequired[],
-   bool Interlace[],
-   double RequiredDPPCLK[][2][DC__NUM_DPP__MAX],
-   double RequiredDISPCLK[][2],
-   double UrgLatency[],
-   unsigned int NoOfDPP[][2][DC__NUM_DPP__MAX],
-   double ProjectedDCFCLKDeepSleep[][2],
-   double MaximumVStartup[][2][DC__NUM_DPP__MAX],
-   double TotalVActivePixelBandwidth[][2],
-   double TotalVActiveCursorBandwidth[][2],
-   double TotalMetaRowBandwidth[][2],
-   double TotalDPTERowBandwidth[][2],
-   unsigned int TotalNumberOfActiveDPP[][2],
-   unsigned int TotalNumberOfDCCActiveDPP[][2],
-   int dpte_group_bytes[],
-   double PrefetchLinesY[][2][DC__NUM_DPP__MAX],
-   double PrefetchLinesC[][2][DC__NUM_DPP__MAX],
-   unsigned int 
swath_width_luma_ub_all_states[][2][DC__NUM_DPP__MAX],
-   unsigned int 
swath_width_chroma_ub_all_states[][2][DC__NUM_DPP__MAX],
-   int BytePerPixelY[],
-   int BytePerPixelC[],
-   int HTotal[],
-   double PixelClock[],
-   double PDEAndMetaPTEBytesPerFrame[][2][DC__NUM_DPP__MAX],
-   double DPTEBytesPerRow[][2][DC__NUM_DPP__MAX],
-   double MetaRowBytes[][2][DC__NUM_DPP__MAX],
-   bool DynamicMetadataEnable[],
-   double VActivePixelBandwidth[][2][DC__NUM_DPP__MAX],
-   double VActiveCursorBandwidth[][2][DC__NUM_DPP__MAX],
-   double ReadBandwidthLuma[],
-   double ReadBandwidthChroma[],
-   double DCFCLKPerState[],
-   double DCFCLKState[][2])
+   int ReorderingBytes)
  {
double   NormalEfficiency = 0;
double   PTEEfficiency = 0;


pgpA7FjMmSM0N.pgp
Description: OpenPGP digital signature


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

2022-02-27 Thread Stephen Rothwell
Hi all,

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

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

between commit:

  e2b993302f40 ("drm/amdgpu: bypass tiling flag check in virtual display case 
(v2)")

from Linus' tree and commit:

  2af104290da5 ("drm: introduce fb_modifiers_not_supported flag in mode_config")

from the drm 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/amd/amdgpu/amdgpu_display.c
index c4387b38229c,9e5fc4cdb8ec..
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@@ -1141,7 -1148,7 +1148,8 @@@ int amdgpu_display_framebuffer_init(str
if (ret)
return ret;
  
-   if (!dev->mode_config.allow_fb_modifiers && 
!adev->enable_virtual_display) {
 -  if (dev->mode_config.fb_modifiers_not_supported) {
++  if (dev->mode_config.fb_modifiers_not_supported &&
++  !adev->enable_virtual_display) {
drm_WARN_ONCE(dev, adev->family >= AMDGPU_FAMILY_AI,
  "GFX9+ requires FB check based on format 
modifier\n");
ret = check_tiling_flags_gfx6(rfb);


pgpgOMqfjoE8D.pgp
Description: OpenPGP digital signature


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

2021-10-29 Thread Joonas Lahtinen
Quoting Stephen Rothwell (2021-10-29 03:48:40)
> Hi all,
> 
> Today's linux-next merge of the drm tree got a conflict in:
> 
>   drivers/gpu/drm/i915/i915_trace.h
> 
> between commit:
> 
>   9a4aa3a2f160 ("drm/i915: Revert 'guc_id' from i915_request tracepoint")
> 
> from Linus' tree and commit:
> 
>   3cb3e3434b9f ("drm/i915/guc: Move fields protected by guc->contexts_lock 
> into sub structure")
> 
> from the drm tree.
> 
> I fixed it up (I used the former version) and can carry the fix as
> necessary.

The resolution for the conflict is to drop the guc_id field completely
in linux-next.

Regards, Joonas

> 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 tree with Linus' tree

2021-10-28 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/i915/i915_trace.h

between commit:

  9a4aa3a2f160 ("drm/i915: Revert 'guc_id' from i915_request tracepoint")

from Linus' tree and commit:

  3cb3e3434b9f ("drm/i915/guc: Move fields protected by guc->contexts_lock into 
sub structure")

from the drm tree.

I fixed it up (I used the former version) 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


pgpYkIFEsAtJA.pgp
Description: OpenPGP digital signature


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

2021-10-10 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/amd/display/include/dal_asic_id.h

between commit:

  7ab0965079bb ("drm/amd/display: USB4 bring up set correct address")

from Linus' tree and commit:

  13900e6fde3f ("drm/amd/display: Fix for null pointer access for ddc pin and 
aux engine.")

from the drm tree.

I fixed it up (I used the former) 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


pgpGPcpaFf_zx.pgp
Description: OpenPGP digital signature


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

2021-08-23 Thread Stephen Rothwell
Hi all,

[Thanks Guenter for pointing this out]

On Mon, 23 Aug 2021 12:41:22 +1000 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the drm tree got a conflict in:
> 
>   drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
> 
> between commit:
> 
>   71ac6f390f6a ("drm/mediatek: Add AAL output size configuration")
> 
> from Linus' tree and commit:
> 
>   78d1783c3243 ("drm/mediatek: Separate aal sub driver")
> 
> from the drm tree.
> 
> I fixed it up (I added the following merge resolution patch after
> using the latter version of the above file) 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.
> 
> From: Stephen Rothwell 
> Date: Mon, 23 Aug 2021 12:37:29 +1000
> Subject: [PATCH] drm/mediatek: merge fix for "Add AAL output size
>  configuration"
> 
> Signed-off-by: Stephen Rothwell 
> ---
>  drivers/gpu/drm/mediatek/mtk_disp_aal.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_aal.c 
> b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
> index 64b45284766a..a6760761088b 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_aal.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
> @@ -18,7 +18,7 @@
>  #define DISP_AAL_EN  0x
>  #define AAL_EN   BIT(0)
>  #define DISP_AAL_SIZE0x0030
> -
> +#define DISP_AAL_OUTPUT_SIZE 0x04d8
>  
>  struct mtk_disp_aal_data {
>   bool has_gamma;
> @@ -57,6 +57,7 @@ void mtk_aal_config(struct device *dev, unsigned int w,
>   struct mtk_disp_aal *aal = dev_get_drvdata(dev);
>  
>   mtk_ddp_write(cmdq_pkt, w << 16 | h, >cmdq_reg, aal->regs, 
> DISP_AAL_SIZE);
> + mtk_ddp_write(cmdq_pkt, w << 16 | h, >cmdq_reg, priv->regs, 
> DISP_AAL_OUTPUT_SIZE);
>  }
>  
>  void mtk_aal_gamma_set(struct device *dev, struct drm_crtc_state *state)

My mistake, I have fixed that patch today to be this:

From: Stephen Rothwell 
Date: Mon, 23 Aug 2021 12:37:29 +1000
Subject: [PATCH] drm/mediatek: merge fix for "Add AAL output size
 configuration"

Signed-off-by: Stephen Rothwell 
---
 drivers/gpu/drm/mediatek/mtk_disp_aal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_disp_aal.c 
b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
index 64b45284766a..a6760761088b 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_aal.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
@@ -18,7 +18,7 @@
 #define DISP_AAL_EN0x
 #define AAL_EN BIT(0)
 #define DISP_AAL_SIZE  0x0030
-
+#define DISP_AAL_OUTPUT_SIZE   0x04d8
 
 struct mtk_disp_aal_data {
bool has_gamma;
@@ -57,6 +57,7 @@ void mtk_aal_config(struct device *dev, unsigned int w,
struct mtk_disp_aal *aal = dev_get_drvdata(dev);
 
mtk_ddp_write(cmdq_pkt, w << 16 | h, >cmdq_reg, aal->regs, 
DISP_AAL_SIZE);
+   mtk_ddp_write(cmdq_pkt, w << 16 | h, >cmdq_reg, aal->regs, 
DISP_AAL_OUTPUT_SIZE);
 }
 
 void mtk_aal_gamma_set(struct device *dev, struct drm_crtc_state *state)

-- 
Cheers,
Stephen Rothwell


pgp6CqUEhWZhh.pgp
Description: OpenPGP digital signature


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

2021-08-22 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c

between commit:

  71ac6f390f6a ("drm/mediatek: Add AAL output size configuration")

from Linus' tree and commit:

  78d1783c3243 ("drm/mediatek: Separate aal sub driver")

from the drm tree.

I fixed it up (I added the following merge resolution patch after
using the latter version of the above file) 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.

From: Stephen Rothwell 
Date: Mon, 23 Aug 2021 12:37:29 +1000
Subject: [PATCH] drm/mediatek: merge fix for "Add AAL output size
 configuration"

Signed-off-by: Stephen Rothwell 
---
 drivers/gpu/drm/mediatek/mtk_disp_aal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_disp_aal.c 
b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
index 64b45284766a..a6760761088b 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_aal.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_aal.c
@@ -18,7 +18,7 @@
 #define DISP_AAL_EN0x
 #define AAL_EN BIT(0)
 #define DISP_AAL_SIZE  0x0030
-
+#define DISP_AAL_OUTPUT_SIZE   0x04d8
 
 struct mtk_disp_aal_data {
bool has_gamma;
@@ -57,6 +57,7 @@ void mtk_aal_config(struct device *dev, unsigned int w,
struct mtk_disp_aal *aal = dev_get_drvdata(dev);
 
mtk_ddp_write(cmdq_pkt, w << 16 | h, >cmdq_reg, aal->regs, 
DISP_AAL_SIZE);
+   mtk_ddp_write(cmdq_pkt, w << 16 | h, >cmdq_reg, priv->regs, 
DISP_AAL_OUTPUT_SIZE);
 }
 
 void mtk_aal_gamma_set(struct device *dev, struct drm_crtc_state *state)
-- 
2.32.0

-- 
Cheers,
Stephen Rothwell


pgppMwES77RZQ.pgp
Description: OpenPGP digital signature


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

2021-08-11 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/i915/i915_globals.c

between commits:

  1354d830cb8f ("drm/i915: Call i915_globals_exit() if pci_register_device() 
fails")
  a07296453bf2 ("drm/i915: fix i915_globals_exit() section mismatch error")

from Linus' tree and commit:

  bb13ea282535 ("drm/i915: Remove i915_globals")

from the drm tree.

I fixed it up (I just removed the file) 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


pgpNm0L99PHrM.pgp
Description: OpenPGP digital signature


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

2021-06-30 Thread Stephen Rothwell
Hi all,

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

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

between commit:

  da68547d3692 ("drm/amdgpu: use vma_lookup() in 
amdgpu_ttm_tt_get_user_pages()")

from Linus' tree and commit:

  04d8d73dbcbe ("drm/amdgpu: add common HMM get pages function")

from the drm 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_ttm.c
index 61c4fb1b87fe,6a214a4dfe04..
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@@ -689,30 -680,12 +680,12 @@@ int amdgpu_ttm_tt_get_user_pages(struc
if (!mmget_not_zero(mm)) /* Happens during process shutdown */
return -ESRCH;
  
-   range = kzalloc(sizeof(*range), GFP_KERNEL);
-   if (unlikely(!range)) {
-   r = -ENOMEM;
-   goto out;
-   }
-   range->notifier = >notifier;
-   range->start = bo->notifier.interval_tree.start;
-   range->end = bo->notifier.interval_tree.last + 1;
-   range->default_flags = HMM_PFN_REQ_FAULT;
-   if (!amdgpu_ttm_tt_is_readonly(ttm))
-   range->default_flags |= HMM_PFN_REQ_WRITE;
- 
-   range->hmm_pfns = kvmalloc_array(ttm->num_pages,
-sizeof(*range->hmm_pfns), GFP_KERNEL);
-   if (unlikely(!range->hmm_pfns)) {
-   r = -ENOMEM;
-   goto out_free_ranges;
-   }
- 
mmap_read_lock(mm);
 -  vma = find_vma(mm, start);
 +  vma = vma_lookup(mm, start);
+   mmap_read_unlock(mm);
 -  if (unlikely(!vma || start < vma->vm_start)) {
 +  if (unlikely(!vma)) {
r = -EFAULT;
-   goto out_unlock;
+   goto out_putmm;
}
if (unlikely((gtt->userflags & AMDGPU_GEM_USERPTR_ANONONLY) &&
vma->vm_file)) {


pgp7yhfXnOda_.pgp
Description: OpenPGP digital signature


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

2021-03-31 Thread Stephen Rothwell
Hi Geert,

On Tue, 30 Mar 2021 09:36:57 +0200 Geert Uytterhoeven  
wrote:
>
> On Mon, Mar 29, 2021 at 4:16 AM Stephen Rothwell  
> wrote:
> > Today's linux-next merge of the drm tree got a conflict in:
> >
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> >
> > between commits:
> >
> >   9adb125dde69 ("drm/amdgpu: re-enable suspend phase 2 for S0ix")
> >   4021229e32bd ("drm/amdgpu/swsmu: skip gfx cgpg on s0ix suspend")
> >   9bb735abcbd8 ("drm/amdgpu: update comments about s0ix suspend/resume")
> >
> > from Linus' tree and commit:
> >
> >   e3c1b0712fdb ("drm/amdgpu: Reset the devices in the XGMI hive duirng 
> > probe")
> >
> > from the drm 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/amd/amdgpu/amdgpu_device.c
> > index 8a5a8ff5d362,0f82c5d21237..
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@@ -2743,16 -2712,15 +2720,25 @@@ static int amdgpu_device_ip_suspend_pha
> > continue;
> > }
> >
> >  +  /* skip suspend of gfx and psp for S0ix
> >  +   * gfx is in gfxoff state, so on resume it will exit gfxoff 
> > just
> >  +   * like at runtime. PSP is also part of the always on 
> > hardware
> >  +   * so no need to suspend it.
> >  +   */
> >  +  if (adev->in_s0ix &&
> >  +  (adev->ip_blocks[i].version->type == 
> > AMD_IP_BLOCK_TYPE_PSP ||
> >  +   adev->ip_blocks[i].version->type == 
> > AMD_IP_BLOCK_TYPE_GFX))
> >  +  continue;
> >  +
> > +   /* skip unnecessary suspend if we do not initialize them 
> > yet */
> > +   if (adev->gmc.xgmi.pending_reset &&
> > +   !(adev->ip_blocks[i].version->type == 
> > AMD_IP_BLOCK_TYPE_GMC ||
> > + adev->ip_blocks[i].version->type == 
> > AMD_IP_BLOCK_TYPE_SMC ||
> > + adev->ip_blocks[i].version->type == 
> > AMD_IP_BLOCK_TYPE_COMMON ||
> > + adev->ip_blocks[i].version->type == 
> > AMD_IP_BLOCK_TYPE_IH)) {
> > +   adev->ip_blocks[i].status.hw = false;
> > +   continue;
> > +   }
> > /* XXX handle errors */
> > r = adev->ip_blocks[i].version->funcs->suspend(adev);
> > /* XXX handle errors */  
> 
> The above is not what you have in next-20210329?
> Your tree has a second copy of the first conflict block after the second:
> 
> /* skip suspend of gfx and psp for S0ix
> [...]
> /* skip unnecessary suspend if we do not initialize them yet 
> */
> [...]
> /* skip suspend of gfx and psp for S0ix
> 

It happened because those commits in Linus' tree are also (as different
commits) in the amdgpu tree and so git happily did a new merge
resolution and ended up with what you see :-(  I'll see if I can fix it
up for today.

-- 
Cheers,
Stephen Rothwell
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2021-03-30 Thread Geert Uytterhoeven
Hi Stephen,

On Mon, Mar 29, 2021 at 4:16 AM Stephen Rothwell  wrote:
> Today's linux-next merge of the drm tree got a conflict in:
>
>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>
> between commits:
>
>   9adb125dde69 ("drm/amdgpu: re-enable suspend phase 2 for S0ix")
>   4021229e32bd ("drm/amdgpu/swsmu: skip gfx cgpg on s0ix suspend")
>   9bb735abcbd8 ("drm/amdgpu: update comments about s0ix suspend/resume")
>
> from Linus' tree and commit:
>
>   e3c1b0712fdb ("drm/amdgpu: Reset the devices in the XGMI hive duirng probe")
>
> from the drm 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/amd/amdgpu/amdgpu_device.c
> index 8a5a8ff5d362,0f82c5d21237..
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@@ -2743,16 -2712,15 +2720,25 @@@ static int amdgpu_device_ip_suspend_pha
> continue;
> }
>
>  +  /* skip suspend of gfx and psp for S0ix
>  +   * gfx is in gfxoff state, so on resume it will exit gfxoff 
> just
>  +   * like at runtime. PSP is also part of the always on hardware
>  +   * so no need to suspend it.
>  +   */
>  +  if (adev->in_s0ix &&
>  +  (adev->ip_blocks[i].version->type == 
> AMD_IP_BLOCK_TYPE_PSP ||
>  +   adev->ip_blocks[i].version->type == 
> AMD_IP_BLOCK_TYPE_GFX))
>  +  continue;
>  +
> +   /* skip unnecessary suspend if we do not initialize them yet 
> */
> +   if (adev->gmc.xgmi.pending_reset &&
> +   !(adev->ip_blocks[i].version->type == 
> AMD_IP_BLOCK_TYPE_GMC ||
> + adev->ip_blocks[i].version->type == 
> AMD_IP_BLOCK_TYPE_SMC ||
> + adev->ip_blocks[i].version->type == 
> AMD_IP_BLOCK_TYPE_COMMON ||
> + adev->ip_blocks[i].version->type == 
> AMD_IP_BLOCK_TYPE_IH)) {
> +   adev->ip_blocks[i].status.hw = false;
> +   continue;
> +   }
> /* XXX handle errors */
> r = adev->ip_blocks[i].version->funcs->suspend(adev);
> /* XXX handle errors */

The above is not what you have in next-20210329?
Your tree has a second copy of the first conflict block after the second:

/* skip suspend of gfx and psp for S0ix
[...]
/* skip unnecessary suspend if we do not initialize them yet */
[...]
/* skip suspend of gfx and psp for S0ix

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2021-03-28 Thread Stephen Rothwell
Hi all,

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

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

between commits:

  9adb125dde69 ("drm/amdgpu: re-enable suspend phase 2 for S0ix")
  4021229e32bd ("drm/amdgpu/swsmu: skip gfx cgpg on s0ix suspend")
  9bb735abcbd8 ("drm/amdgpu: update comments about s0ix suspend/resume")

from Linus' tree and commit:

  e3c1b0712fdb ("drm/amdgpu: Reset the devices in the XGMI hive duirng probe")

from the drm 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/amd/amdgpu/amdgpu_device.c
index 8a5a8ff5d362,0f82c5d21237..
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@@ -2743,16 -2712,15 +2720,25 @@@ static int amdgpu_device_ip_suspend_pha
continue;
}
  
 +  /* skip suspend of gfx and psp for S0ix
 +   * gfx is in gfxoff state, so on resume it will exit gfxoff just
 +   * like at runtime. PSP is also part of the always on hardware
 +   * so no need to suspend it.
 +   */
 +  if (adev->in_s0ix &&
 +  (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP 
||
 +   adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX))
 +  continue;
 +
+   /* skip unnecessary suspend if we do not initialize them yet */
+   if (adev->gmc.xgmi.pending_reset &&
+   !(adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC 
||
+ adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SMC 
||
+ adev->ip_blocks[i].version->type == 
AMD_IP_BLOCK_TYPE_COMMON ||
+ adev->ip_blocks[i].version->type == 
AMD_IP_BLOCK_TYPE_IH)) {
+   adev->ip_blocks[i].status.hw = false;
+   continue;
+   }
/* XXX handle errors */
r = adev->ip_blocks[i].version->funcs->suspend(adev);
/* XXX handle errors */


pgpSHybOFSBOI.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2021-02-14 Thread Stephen Rothwell
Hi all,

On Mon, 1 Feb 2021 12:30:12 +1100 Stephen Rothwell  
wrote:
> 
> Today's linux-next merge of the drm tree got a conflict in:
> 
>   drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
> 
> between commit:
> 
>   a119f87b86bc ("Revert "drm/amdgpu/swsmu: drop set_fan_speed_percent (v2)"")
> 
> from Linus' tree and commit:
> 
>   d8a0b8dd690b ("drm/amd/pm: add pptable_funcs documentation (v3)")
> 
> from the drm 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.
> 
> diff --cc drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
> index 0d797fa9f5cc,a087e00382e6..
> --- a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
> +++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
> @@@ -551,39 -924,199 +924,201 @@@ struct pptable_funcs 
>   int (*display_clock_voltage_request)(struct smu_context *smu, struct
>pp_display_clock_request
>*clock_req);
> + 
> + /**
> +  * @get_fan_control_mode: Get the current fan control mode.
> +  */
>   uint32_t (*get_fan_control_mode)(struct smu_context *smu);
> + 
> + /**
> +  * @set_fan_control_mode: Set the fan control mode.
> +  */
>   int (*set_fan_control_mode)(struct smu_context *smu, uint32_t mode);
> + 
>  +int (*set_fan_speed_percent)(struct smu_context *smu, uint32_t speed);
> ++
> + /**
> +  * @set_fan_speed_rpm: Set a static fan speed in RPM.
> +  */
>   int (*set_fan_speed_rpm)(struct smu_context *smu, uint32_t speed);
> + 
> + /**
> +  * @set_xgmi_pstate: Set inter-chip global memory interconnect pstate.
> +  * : Pstate to set. D0 if Nonzero, D3 otherwise.
> +  */
>   int (*set_xgmi_pstate)(struct smu_context *smu, uint32_t pstate);
> + 
> + /**
> +  * @gfx_off_control: Enable/disable graphics engine poweroff.
> +  */
>   int (*gfx_off_control)(struct smu_context *smu, bool enable);
> + 
> + 
> + /**
> +  * @get_gfx_off_status: Get graphics engine poweroff status.
> +  *
> +  * Return:
> +  * 0 - GFXOFF(default).
> +  * 1 - Transition out of GFX State.
> +  * 2 - Not in GFXOFF.
> +  * 3 - Transition into GFXOFF.
> +  */
>   uint32_t (*get_gfx_off_status)(struct smu_context *smu);
> + 
> + /**
> +  * @register_irq_handler: Register interupt request handlers.
> +  */
>   int (*register_irq_handler)(struct smu_context *smu);
> + 
> + /**
> +  * @set_azalia_d3_pme: Wake the audio decode engine from d3 sleep.
> +  */
>   int (*set_azalia_d3_pme)(struct smu_context *smu);
> + 
> + /**
> +  * @get_max_sustainable_clocks_by_dc: Get a copy of the max sustainable
> +  *clock speeds table.
> +  *
> +  * Provides a way for the display component (DC) to get the max
> +  * sustainable clocks from the SMU.
> +  */
>   int (*get_max_sustainable_clocks_by_dc)(struct smu_context *smu, struct 
> pp_smu_nv_clock_table *max_clocks);
> + 
> + /**
> +  * @baco_is_support: Check if GPU supports BACO (Bus Active, Chip Off).
> +  */
>   bool (*baco_is_support)(struct smu_context *smu);
> + 
> + /**
> +  * @baco_get_state: Get the current BACO state.
> +  *
> +  * Return: Current BACO state.
> +  */
>   enum smu_baco_state (*baco_get_state)(struct smu_context *smu);
> + 
> + /**
> +  * @baco_set_state: Enter/exit BACO.
> +  */
>   int (*baco_set_state)(struct smu_context *smu, enum smu_baco_state 
> state);
> + 
> + /**
> +  * @baco_enter: Enter BACO.
> +  */
>   int (*baco_enter)(struct smu_context *smu);
> + 
> + /**
> +  * @baco_exit: Exit Baco.
> +  */
>   int (*baco_exit)(struct smu_context *smu);
> + 
> + /**
> +  * @mode1_reset_is_support: Check if GPU supports mode1 reset.
> +  */
>   bool (*mode1_reset_is_support)(struct smu_context *smu);
> + 
> + /**
> +  * @mode1_reset: Perform mode1 reset.
> +  *
> +  * Complete GPU reset.
> +  */
>   int (*mode1_reset)(struct smu_context *smu);
> + 
> + /**
> +  * @mode2_reset: Perform mode2 reset.
> +  *
> +  * Mode2 reset generally does not reset as many IPs as mode1 reset. The
> +  * IPs reset varies by asic.
> +  */
>   int (*mode2_reset)(struct smu_context *smu);
> + 
> + /**
> +  * @get_dpm_ultimate_freq: Get the hard frequency range of a clock
> +  * domain in MHz.
> +  */
>   int (*get_dpm_ultimate_freq)(struct smu_context *smu, enum smu_clk_type 
> clk_type, uint32_t *min, uint32_t *max);
> + 
> + /**
> +  

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

2021-01-31 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h

between commit:

  a119f87b86bc ("Revert "drm/amdgpu/swsmu: drop set_fan_speed_percent (v2)"")

from Linus' tree and commit:

  d8a0b8dd690b ("drm/amd/pm: add pptable_funcs documentation (v3)")

from the drm 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/pm/inc/amdgpu_smu.h
index 0d797fa9f5cc,a087e00382e6..
--- a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
@@@ -551,39 -924,199 +924,201 @@@ struct pptable_funcs 
int (*display_clock_voltage_request)(struct smu_context *smu, struct
 pp_display_clock_request
 *clock_req);
+ 
+   /**
+* @get_fan_control_mode: Get the current fan control mode.
+*/
uint32_t (*get_fan_control_mode)(struct smu_context *smu);
+ 
+   /**
+* @set_fan_control_mode: Set the fan control mode.
+*/
int (*set_fan_control_mode)(struct smu_context *smu, uint32_t mode);
+ 
 +  int (*set_fan_speed_percent)(struct smu_context *smu, uint32_t speed);
++
+   /**
+* @set_fan_speed_rpm: Set a static fan speed in RPM.
+*/
int (*set_fan_speed_rpm)(struct smu_context *smu, uint32_t speed);
+ 
+   /**
+* @set_xgmi_pstate: Set inter-chip global memory interconnect pstate.
+* : Pstate to set. D0 if Nonzero, D3 otherwise.
+*/
int (*set_xgmi_pstate)(struct smu_context *smu, uint32_t pstate);
+ 
+   /**
+* @gfx_off_control: Enable/disable graphics engine poweroff.
+*/
int (*gfx_off_control)(struct smu_context *smu, bool enable);
+ 
+ 
+   /**
+* @get_gfx_off_status: Get graphics engine poweroff status.
+*
+* Return:
+* 0 - GFXOFF(default).
+* 1 - Transition out of GFX State.
+* 2 - Not in GFXOFF.
+* 3 - Transition into GFXOFF.
+*/
uint32_t (*get_gfx_off_status)(struct smu_context *smu);
+ 
+   /**
+* @register_irq_handler: Register interupt request handlers.
+*/
int (*register_irq_handler)(struct smu_context *smu);
+ 
+   /**
+* @set_azalia_d3_pme: Wake the audio decode engine from d3 sleep.
+*/
int (*set_azalia_d3_pme)(struct smu_context *smu);
+ 
+   /**
+* @get_max_sustainable_clocks_by_dc: Get a copy of the max sustainable
+*clock speeds table.
+*
+* Provides a way for the display component (DC) to get the max
+* sustainable clocks from the SMU.
+*/
int (*get_max_sustainable_clocks_by_dc)(struct smu_context *smu, struct 
pp_smu_nv_clock_table *max_clocks);
+ 
+   /**
+* @baco_is_support: Check if GPU supports BACO (Bus Active, Chip Off).
+*/
bool (*baco_is_support)(struct smu_context *smu);
+ 
+   /**
+* @baco_get_state: Get the current BACO state.
+*
+* Return: Current BACO state.
+*/
enum smu_baco_state (*baco_get_state)(struct smu_context *smu);
+ 
+   /**
+* @baco_set_state: Enter/exit BACO.
+*/
int (*baco_set_state)(struct smu_context *smu, enum smu_baco_state 
state);
+ 
+   /**
+* @baco_enter: Enter BACO.
+*/
int (*baco_enter)(struct smu_context *smu);
+ 
+   /**
+* @baco_exit: Exit Baco.
+*/
int (*baco_exit)(struct smu_context *smu);
+ 
+   /**
+* @mode1_reset_is_support: Check if GPU supports mode1 reset.
+*/
bool (*mode1_reset_is_support)(struct smu_context *smu);
+ 
+   /**
+* @mode1_reset: Perform mode1 reset.
+*
+* Complete GPU reset.
+*/
int (*mode1_reset)(struct smu_context *smu);
+ 
+   /**
+* @mode2_reset: Perform mode2 reset.
+*
+* Mode2 reset generally does not reset as many IPs as mode1 reset. The
+* IPs reset varies by asic.
+*/
int (*mode2_reset)(struct smu_context *smu);
+ 
+   /**
+* @get_dpm_ultimate_freq: Get the hard frequency range of a clock
+* domain in MHz.
+*/
int (*get_dpm_ultimate_freq)(struct smu_context *smu, enum smu_clk_type 
clk_type, uint32_t *min, uint32_t *max);
+ 
+   /**
+* @set_soft_freq_limited_range: Set the soft frequency range of a clock
+*   domain in MHz.
+ 

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

2021-01-17 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h

between commits:

  3c517ca5212f ("Revert "drm/amdgpu/disply: fix documentation warnings in 
display manager"")
  a7ddd22151fc ("Revert "drm/amd/display: Expose new CRC window property"")

from Linus' tree and commit:

  71338cb4a7c2 ("drm/amd/display: enable idle optimizations for linux (MALL 
stutter)")

from the drm 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/display/amdgpu_dm/amdgpu_dm.h
index 1182dafcef02,f084e2fc9569..
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
@@@ -336,6 -336,39 +336,13 @@@ struct amdgpu_display_manager 
 */
const struct gpu_info_soc_bounding_box_v1_0 *soc_bounding_box;
  
+   /**
+* @active_vblank_irq_count
+*
+* number of currently active vblank irqs
+*/
+   uint32_t active_vblank_irq_count;
+ 
 -#ifdef CONFIG_DEBUG_FS
 -  /**
 -   * @crc_win_x_start_property:
 -   *
 -   * X start of the crc calculation window
 -   */
 -  struct drm_property *crc_win_x_start_property;
 -  /**
 -   * @crc_win_y_start_property:
 -   *
 -   * Y start of the crc calculation window
 -   */
 -  struct drm_property *crc_win_y_start_property;
 -  /**
 -   * @crc_win_x_end_property:
 -   *
 -   * X end of the crc calculation window
 -   */
 -  struct drm_property *crc_win_x_end_property;
 -  /**
 -   * @crc_win_y_end_property:
 -   *
 -   * Y end of the crc calculation window
 -   */
 -  struct drm_property *crc_win_y_end_property;
 -#endif
/**
 * @mst_encoders:
 *


pgp3Wohg1EI7d.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2020-10-01 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

between commit:

  b19515253623 ("drm/amd/pm: setup APU dpm clock table in SMU HW 
initialization")

from the Linus tree and commits:

  82cac71c1b64 ("drm/amd/pm: put Navi1X umc cdr workaround in post_smu_init")
  236b156f7388 ("drm/amd/pm: apply no power source workaround if dc reported by 
gpio")
  1653a179c822 ("drm/amd/pm: move NAVI1X power mode switching workaround to 
post_init")

from the drm 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/pm/swsmu/amdgpu_smu.c
index 8dc5abb6931e,5c4b74f964fc..
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@@ -955,35 -1013,6 +1002,17 @@@ static int smu_smc_hw_setup(struct smu_
return ret;
}
  
-   ret = smu_disable_umc_cdr_12gbps_workaround(smu);
-   if (ret) {
-   dev_err(adev->dev, "Workaround failed to disable UMC CDR 
feature on 12Gbps SKU!\n");
-   return ret;
-   }
- 
-   /*
-* For Navi1X, manually switch it to AC mode as PMFW
-* may boot it with DC mode.
-*/
-   ret = smu_set_power_source(smu,
-  adev->pm.ac_power ? SMU_POWER_SOURCE_AC :
-  SMU_POWER_SOURCE_DC);
-   if (ret) {
-   dev_err(adev->dev, "Failed to switch to %s mode!\n", 
adev->pm.ac_power ? "AC" : "DC");
-   return ret;
-   }
- 
 +  /*
 +   * Set initialized values (get from vbios) to dpm tables context such as
 +   * gfxclk, memclk, dcefclk, and etc. And enable the DPM feature for each
 +   * type of clks.
 +   */
 +  ret = smu_set_default_dpm_table(smu);
 +  if (ret) {
 +  dev_err(adev->dev, "Failed to setup default dpm clock 
tables!\n");
 +  return ret;
 +  }
 +
ret = smu_notify_display_change(smu);
if (ret)
return ret;


pgpSuB_Jf6zSR.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2020-05-24 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/amd/display/dc/dcn10/dcn10_init.c
  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c

between commit:

  31ecebee9c36 ("drm/amd/display: Defer cursor lock until after VUPDATE")

from Linus' tree and commits:

  b3a941df690f ("drm/amd/display: Power down hw blocks on boot")
  4b0e95d1838f ("drm/amd/display: Add set backlight to hw sequencer.")
  ddea4ed01058 ("drm/amd/display: remove duplicate assignment of dcn21_funcs 
members")
  3ba01817365c ("drm/amd/display: Move panel_cntl specific register from abm to 
panel_cntl.")

from the drm 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/display/dc/dcn10/dcn10_init.c
index 9e8e32629e47,897a3d25685a..
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_init.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_init.c
@@@ -72,7 -72,8 +72,9 @@@ static const struct hw_sequencer_funcs 
.set_clock = dcn10_set_clock,
.get_clock = dcn10_get_clock,
.get_vupdate_offset_from_vsync = dcn10_get_vupdate_offset_from_vsync,
+   .set_backlight_level = dce110_set_backlight_level,
+   .set_abm_immediate_disable = dce110_set_abm_immediate_disable,
 +  .calc_vupdate_position = dcn10_calc_vupdate_position,
  };
  
  static const struct hwseq_private_funcs dcn10_private_funcs = {
diff --cc drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c
index 8334bbd6eabb,a8bcd747d7ba..
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_init.c
@@@ -83,7 -83,8 +83,9 @@@ static const struct hw_sequencer_funcs 
.init_vm_ctx = dcn20_init_vm_ctx,
.set_flip_control_gsl = dcn20_set_flip_control_gsl,
.get_vupdate_offset_from_vsync = dcn10_get_vupdate_offset_from_vsync,
+   .set_backlight_level = dce110_set_backlight_level,
+   .set_abm_immediate_disable = dce110_set_abm_immediate_disable,
 +  .calc_vupdate_position = dcn10_calc_vupdate_position,
  };
  
  static const struct hwseq_private_funcs dcn20_private_funcs = {
diff --cc drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c
index 4dd634118df2,e97dfaa656e9..
--- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_init.c
@@@ -86,12 -86,9 +86,10 @@@ static const struct hw_sequencer_funcs 
.optimize_pwr_state = dcn21_optimize_pwr_state,
.exit_optimized_pwr_state = dcn21_exit_optimized_pwr_state,
.get_vupdate_offset_from_vsync = dcn10_get_vupdate_offset_from_vsync,
 +  .calc_vupdate_position = dcn10_calc_vupdate_position,
-   .set_cursor_position = dcn10_set_cursor_position,
-   .set_cursor_attribute = dcn10_set_cursor_attribute,
-   .set_cursor_sdr_white_level = dcn10_set_cursor_sdr_white_level,
-   .optimize_pwr_state = dcn21_optimize_pwr_state,
-   .exit_optimized_pwr_state = dcn21_exit_optimized_pwr_state,
+   .power_down = dce110_power_down,
+   .set_backlight_level = dce110_set_backlight_level,
+   .set_abm_immediate_disable = dce110_set_abm_immediate_disable,
  };
  
  static const struct hwseq_private_funcs dcn21_private_funcs = {


pgpn4TVTi0GCQ.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2020-03-22 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

between commit:

  eb916a5a93a6 ("drm/amd/display: Fix pageflip event race condition for DCN.")

from Linus' tree and commit:

  7f2be468a855 ("drm/amdgpu: Stop using the DRIVER debugging flag for vblank 
debugging messages")

from the drm 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/display/amdgpu_dm/amdgpu_dm.c
index 6240259b3a93,a4256780e70e..
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@@ -522,9 -524,8 +524,9 @@@ static void dm_dcn_crtc_high_irq(void *
  
acrtc_state = to_dm_crtc_state(acrtc->base.state);
  
-   DRM_DEBUG_DRIVER("crtc:%d, vupdate-vrr:%d, planes:%d\n", acrtc->crtc_id,
-amdgpu_dm_vrr_active(acrtc_state),
-acrtc_state->active_planes);
 -  DRM_DEBUG_VBL("crtc:%d, vupdate-vrr:%d\n", acrtc->crtc_id,
 -amdgpu_dm_vrr_active(acrtc_state));
++  DRM_DEBUG_VBL("crtc:%d, vupdate-vrr:%d, planes:%d\n", acrtc->crtc_id,
++amdgpu_dm_vrr_active(acrtc_state),
++acrtc_state->active_planes);
  
amdgpu_dm_crtc_handle_crc_irq(>base);
drm_crtc_handle_vblank(>base);


pgpsV3twTRUvG.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2019-11-12 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/i915/i915_drv.h
  drivers/gpu/drm/i915/intel_pm.c
  drivers/gpu/drm/i915/intel_pm.h

between commit:

  7e34f4e4aad3 ("drm/i915/gen8+: Add RC6 CTX corruption WA")

from Linus' tree and commits:

  c113236718e8 ("drm/i915: Extract GT render sleep (rc6) management")
  3e7abf814193 ("drm/i915: Extract GT render power state management")

from the drm tree.

I fixed it up (This was too messy, so I effectively reverted the former
patch) 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


pgpyCI8wZZXOT.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-11-12 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/i915/i915_reg.h

between commit:

  1d85a299c4db ("drm/i915: Lower RM timeout to avoid DSI hard hangs")

from Linus' tree and commit:

  41286861b4c9 ("drm/i915/tgl: Add DC3CO counter in i915_dmc_info")

from the drm 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/i915/i915_reg.h
index f8ee9aba3955,53c280c4e741..
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@@ -7217,10 -7351,8 +7357,12 @@@ enum 
  #define TGL_DMC_DEBUG_DC5_COUNT   _MMIO(0x101084)
  #define TGL_DMC_DEBUG_DC6_COUNT   _MMIO(0x101088)
  
+ #define DMC_DEBUG3_MMIO(0x101090)
+ 
 +/* Display Internal Timeout Register */
 +#define RM_TIMEOUT_MMIO(0x42060)
 +#define  MMIO_TIMEOUT_US(us)  ((us) << 0)
 +
  /* interrupts */
  #define DE_MASTER_IRQ_CONTROL   (1 << 31)
  #define DE_SPRITEB_FLIP_DONE(1 << 29)


pgp2OmpQWqGqu.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-11-12 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/i915/i915_drv.c

between commits:

  7e34f4e4aad3 ("drm/i915/gen8+: Add RC6 CTX corruption WA")
  2f216a850715 ("drm/i915: update rawclk also on resume")


from Linus' tree and commits:

  5bcd53aa39f3 ("drm/i915: pass i915 to i915_driver_modeset_probe()")
  fd6fe087ca47 ("drm/i915/gt: Call intel_gt_sanitize() directly")

from the drm 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/i915/i915_drv.c
index 3d717e282908,ccb5b566795f..
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@@ -364,11 -296,14 +296,11 @@@ static int i915_driver_modeset_probe(st
if (ret)
goto cleanup_vga_client;
  
-   intel_power_domains_init_hw(dev_priv, false);
 -  /* must happen before intel_power_domains_init_hw() on VLV/CHV */
 -  intel_update_rawclk(i915);
 -
+   intel_power_domains_init_hw(i915, false);
  
-   intel_csr_ucode_init(dev_priv);
+   intel_csr_ucode_init(i915);
  
-   ret = intel_irq_install(dev_priv);
+   ret = intel_irq_install(i915);
if (ret)
goto cleanup_csr;
  
@@@ -2048,14 -1948,8 +1947,10 @@@ static int i915_drm_resume_early(struc
  
intel_display_power_resume_early(dev_priv);
  
-   intel_sanitize_gt_powersave(dev_priv);
- 
intel_power_domains_resume(dev_priv);
  
 +  i915_rc6_ctx_wa_resume(dev_priv);
 +
-   intel_gt_sanitize(_priv->gt, true);
- 
enable_rpm_wakeref_asserts(_priv->runtime_pm);
  
return ret;


pgpijJrN8r5sA.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-11-12 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/i915/gt/intel_gt_pm.c

between commit:

  7e34f4e4aad3 ("drm/i915/gen8+: Add RC6 CTX corruption WA")

from Linus' tree and commit:

  3e7abf814193 ("drm/i915: Extract GT render power state management")

from the drm 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/i915/gt/intel_gt_pm.c
index fac75afed35b,060a27d9af34..
--- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
@@@ -38,20 -61,10 +61,13 @@@ static int __gt_unpark(struct intel_wak
gt->awake = intel_display_power_get(i915, POWER_DOMAIN_GT_IRQ);
GEM_BUG_ON(!gt->awake);
  
 +  if (NEEDS_RC6_CTX_CORRUPTION_WA(i915))
 +  intel_uncore_forcewake_get(>uncore, FORCEWAKE_ALL);
 +
-   intel_enable_gt_powersave(i915);
- 
-   i915_update_gfx_val(i915);
-   if (INTEL_GEN(i915) >= 6)
-   gen6_rps_busy(i915);
- 
+   intel_rps_unpark(>rps);
i915_pmu_gt_unparked(i915);
  
-   intel_gt_queue_hangcheck(gt);
- 
-   pm_notify(i915, INTEL_GT_UNPARK);
+   intel_gt_unpark_requests(gt);
  
return 0;
  }
@@@ -64,17 -77,12 +80,17 @@@ static int __gt_park(struct intel_waker
  
GEM_TRACE("\n");
  
-   pm_notify(i915, INTEL_GT_PARK);
+   intel_gt_park_requests(gt);
  
+   i915_vma_parked(gt);
i915_pmu_gt_parked(i915);
-   if (INTEL_GEN(i915) >= 6)
-   gen6_rps_idle(i915);
+   intel_rps_park(>rps);
  
 +  if (NEEDS_RC6_CTX_CORRUPTION_WA(i915)) {
 +  i915_rc6_ctx_wa_check(i915);
 +  intel_uncore_forcewake_put(>uncore, FORCEWAKE_ALL);
 +  }
 +
/* Everything switched off, flush any residual interrupt just in case */
intel_synchronize_irq(i915);
  


pgpb7jhkB2Xxa.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-11-12 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/i915/gt/intel_engine_types.h

between commit:

  311a50e76a33 ("drm/i915: Add support for mandatory cmdparsing")

from Linus' tree and commits:

  cdb736fa8b8b ("drm/i915: Use engine relative LRIs on context setup")
  058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats")

from the drm 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/i915/gt/intel_engine_types.h
index 9dd8c299cb2d,c5d1047a4bc5..
--- a/drivers/gpu/drm/i915/gt/intel_engine_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_engine_types.h
@@@ -473,15 -454,13 +454,14 @@@ struct intel_engine_cs 
/* status_notifier: list of callbacks for context-switch changes */
struct atomic_notifier_head context_status_notifier;
  
-   struct intel_engine_hangcheck hangcheck;
- 
 -#define I915_ENGINE_NEEDS_CMD_PARSER BIT(0)
 +#define I915_ENGINE_USING_CMD_PARSER BIT(0)
  #define I915_ENGINE_SUPPORTS_STATS   BIT(1)
  #define I915_ENGINE_HAS_PREEMPTION   BIT(2)
  #define I915_ENGINE_HAS_SEMAPHORES   BIT(3)
  #define I915_ENGINE_NEEDS_BREADCRUMB_TASKLET BIT(4)
  #define I915_ENGINE_IS_VIRTUAL   BIT(5)
+ #define I915_ENGINE_HAS_RELATIVE_MMIO BIT(6)
 +#define I915_ENGINE_REQUIRES_CMD_PARSER BIT(7)
unsigned int flags;
  
/*


pgpLJLxWzPA5E.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-11-12 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/i915/gem/i915_gem_context.c

between commit:

  f8c08d8faee5 ("drm/i915/cmdparser: Add support for backward jumps")

from Linus' tree and commit:

  a4e7ccdac38e ("drm/i915: Move context management under GEM")

from the drm 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/i915/gem/i915_gem_context.c
index e41fd94ae5a9,de6e55af82cf..
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@@ -443,9 -527,10 +529,13 @@@ __create_context(struct drm_i915_privat
for (i = 0; i < ARRAY_SIZE(ctx->hang_timestamp); i++)
ctx->hang_timestamp[i] = jiffies - CONTEXT_FAST_HANG_JIFFIES;
  
 +  ctx->jump_whitelist = NULL;
 +  ctx->jump_whitelist_cmds = 0;
 +
+   spin_lock(>gem.contexts.lock);
+   list_add_tail(>link, >gem.contexts.list);
+   spin_unlock(>gem.contexts.lock);
+ 
return ctx;
  
  err_free:


pgpGAT0Du6p3i.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-08-25 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/mediatek/mtk_drm_drv.c

between commit:

  7837951a12fd ("drm/mediatek: include dma-mapping header")

from Linus' tree and commit:

  9aef5867c86c ("drm/mediatek: drop use of drmP.h")

from the drm 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/mediatek/mtk_drm_drv.c
index 945bc20f1d33,2ee809a6f3dc..
--- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@@ -4,9 -4,16 +4,17 @@@
   * Author: YT SHEN 
   */
  
- #include 
+ #include 
+ #include 
+ #include 
+ #include 
+ #include 
+ #include 
++#include 
+ 
  #include 
  #include 
+ #include 
  #include 
  #include 
  #include 
@@@ -352,21 -314,8 +346,20 @@@ static const struct file_operations mtk
.compat_ioctl = drm_compat_ioctl,
  };
  
 +/*
 + * We need to override this because the device used to import the memory is
 + * not dev->dev, as drm_gem_prime_import() expects.
 + */
 +struct drm_gem_object *mtk_drm_gem_prime_import(struct drm_device *dev,
 +  struct dma_buf *dma_buf)
 +{
 +  struct mtk_drm_private *private = dev->dev_private;
 +
 +  return drm_gem_prime_import_dev(dev, dma_buf, private->dma_dev);
 +}
 +
  static struct drm_driver mtk_drm_driver = {
-   .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME |
-  DRIVER_ATOMIC,
+   .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC,
  
.gem_free_object_unlocked = mtk_drm_gem_free_object,
.gem_vm_ops = _gem_cma_vm_ops,
@@@ -374,8 -323,6 +367,7 @@@
  
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
-   .gem_prime_export = drm_gem_prime_export,
 +  .gem_prime_import = mtk_drm_gem_prime_import,
.gem_prime_get_sg_table = mtk_gem_prime_get_sg_table,
.gem_prime_import_sg_table = mtk_gem_prime_import_sg_table,
.gem_prime_mmap = mtk_drm_gem_mmap_buf,


pgpXjZepZEVpT.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-06-10 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/cirrus/cirrus_drv.h
  include/drm/gma_drm.h

between commits:

  a61127c21302 ("treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 
335")
  c51669eafb45 ("treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 
377")

from Linus' tree and commits:

  d825c565304f ("drm/gma500: remove empty gma_drm.h header file")
  0388f2f61bef ("drm/cirrus: remove leftover files")

from the drm tree.

I fixed it up (I just removed te file) 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


pgpqJ51KoyXgO.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2018-06-03 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

between commit:

  a9e8d27574f2 ("drm/amd/display: Make atomic-check validate underscan changes")

from Linus' tree and commit:

  dm_update_crtcs_state ("drm/amd/display: Couple formatting fixes")

from the drm 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/display/amdgpu_dm/amdgpu_dm.c
index 27579443cdc5,1ce10bc2d37b..
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@@ -4577,14 -4650,11 +4650,14 @@@ static int dm_update_crtcs_state(struc
/* TODO This hack should go away */
if (aconnector && enable) {
// Make sure fake sink is created in plug-in scenario
 -  new_con_state = drm_atomic_get_connector_state(state,
 +  drm_new_conn_state = 
drm_atomic_get_new_connector_state(state,
-   
>base);
+   
>base);
 +  drm_old_conn_state = 
drm_atomic_get_old_connector_state(state,
 +  
>base);
 +
  
 -  if (IS_ERR(new_con_state)) {
 -  ret = PTR_ERR_OR_ZERO(new_con_state);
 +  if (IS_ERR(drm_new_conn_state)) {
 +  ret = PTR_ERR_OR_ZERO(drm_new_conn_state);
break;
}
  


pgp8AWiePUo4E.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2018-03-25 Thread Stephen Rothwell
Hi all,

On Thu, 22 Mar 2018 17:37:22 +1100 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the drm tree got conflicts in several amdgpu
> files because there are a set of (mostly identical) patches that appear
> Linus' tree and the drm tree.  In each case I just used the version fo
> the file from the drm tree.
> 
> You should do a test merge between your tree and Linus' tree and see what
> you want to do about the resolution (either do the back merge (I think
> with v4.16-rc6), or provide Linus with branch that has the merge done).
> Its a bit of a mess :-(

I got a few more of these today.
-- 
Cheers,
Stephen Rothwell


pgp0UZxcTi53J.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2018-03-25 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

between commit:

  140bcaa23a1c ("drm/vmwgfx: Fix black screen and device errors when running 
without fbdev")

from Linus' tree and commit:

  c3b9b1657344 ("drm/vmwgfx: Improve on hibernation")

from the drm 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/vmwgfx/vmwgfx_drv.h
index 9116fe8baebc,9e60de95b863..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@@ -938,7 -947,8 +947,9 @@@ int vmw_kms_present(struct vmw_private 
  int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
  void vmw_kms_legacy_hotspot_clear(struct vmw_private *dev_priv);
 +void vmw_kms_lost_device(struct drm_device *dev);
+ int vmw_kms_suspend(struct drm_device *dev);
+ int vmw_kms_resume(struct drm_device *dev);
  
  int vmw_dumb_create(struct drm_file *file_priv,
struct drm_device *dev,
diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 3c824fd7cbf3,3628a9fe705f..
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@@ -2561,11 -2551,10 +2557,12 @@@ int vmw_kms_helper_resource_prepare(str
if (res->backup) {
ret = vmw_kms_helper_buffer_prepare(res->dev_priv, res->backup,
interruptible,
-   res->dev_priv->has_mob);
+   res->dev_priv->has_mob,
+   false);
if (ret)
goto out_unreserve;
 +
 +  ctx->buf = vmw_dmabuf_reference(res->backup);
}
ret = vmw_resource_validate(res);
if (ret)
@@@ -2863,12 -2850,49 +2860,59 @@@ int vmw_kms_set_config(struct drm_mode_
  }
  
  
 +/**
 + * vmw_kms_lost_device - Notify kms that modesetting capabilities will be lost
 + *
 + * @dev: Pointer to the drm device
 + */
 +void vmw_kms_lost_device(struct drm_device *dev)
 +{
 +  drm_atomic_helper_shutdown(dev);
 +}
++
+ /**
+  * vmw_kms_suspend - Save modesetting state and turn modesetting off.
+  *
+  * @dev: Pointer to the drm device
+  * Return: 0 on success. Negative error code on failure.
+  */
+ int vmw_kms_suspend(struct drm_device *dev)
+ {
+   struct vmw_private *dev_priv = vmw_priv(dev);
+ 
+   dev_priv->suspend_state = drm_atomic_helper_suspend(dev);
+   if (IS_ERR(dev_priv->suspend_state)) {
+   int ret = PTR_ERR(dev_priv->suspend_state);
+ 
+   DRM_ERROR("Failed kms suspend: %d\n", ret);
+   dev_priv->suspend_state = NULL;
+ 
+   return ret;
+   }
+ 
+   return 0;
+ }
+ 
+ 
+ /**
+  * vmw_kms_resume - Re-enable modesetting and restore state
+  *
+  * @dev: Pointer to the drm device
+  * Return: 0 on success. Negative error code on failure.
+  *
+  * State is resumed from a previous vmw_kms_suspend(). It's illegal
+  * to call this function without a previous vmw_kms_suspend().
+  */
+ int vmw_kms_resume(struct drm_device *dev)
+ {
+   struct vmw_private *dev_priv = vmw_priv(dev);
+   int ret;
+ 
+   if (WARN_ON(!dev_priv->suspend_state))
+   return 0;
+ 
+   ret = drm_atomic_helper_resume(dev, dev_priv->suspend_state);
+   dev_priv->suspend_state = NULL;
+ 
+   return ret;
+ }


pgpYfWuSwRM3o.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2018-03-22 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the drm tree got conflicts in several amdgpu
files because there are a set of (mostly identical) patches that appear
Linus' tree and the drm tree.  In each case I just used the version fo
the file from the drm tree.

You should do a test merge between your tree and Linus' tree and see what
you want to do about the resolution (either do the back merge (I think
with v4.16-rc6), or provide Linus with branch that has the merge done).
Its a bit of a mess :-(

-- 
Cheers,
Stephen Rothwell


pgp5ug5mQeQ9u.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2018-03-12 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c

between commit:

  a0aaa03062be ("drm/amd/powerplay: fix power over limit on Fiji")

from the Linus' and commit:

  a5278e511dce ("drm/amd/pp: Revert gfx/compute profile switch sysfs")

from the drm tree.

I fixed it up (I just used the latter version) 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


pgpC47v1X9jIn.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2018-02-20 Thread Rodrigo Vivi
On Mon, Feb 19, 2018 at 10:10:50AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the drm tree got a conflict in:
> 
>   drivers/gpu/drm/i915/intel_breadcrumbs.c
> 
> between commit:
> 
>   117172c8f9d4 ("drm/i915/breadcrumbs: Ignore unsubmitted signalers")
> 
> from Linus' tree and commit:
> 
>   b7a3f33bd5ab ("drm/i915/breadcrumbs: Drop request reference for the 
> signaler thread")
> 
> from the drm tree.
> 
> These are basically identical for the conflicting section except that
> the former added a line:
> 
>   GEM_BUG_ON(!i915_gem_request_completed(request));
> 
> which I left in.
> 
> I fixed it up (see above) 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.

For this and for the PMU one, I'm really sorry. I believe I should had
mentioned this to Dave when sending pull request for drm-intel-fixes.

I didn't mentioned because for what fixes is concerned this shouldn't
be a problem, but I totally forgot about linux-next. Please accept my
apologies.

Do you use any rerere on linux-next? I wonder if drm-rerere could be used
somehow here to simplify this process of propagating conflicts resolutions
like this.

Thanks,
Rodrigo.

> 
> -- 
> Cheers,
> Stephen Rothwell



> ___
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2018-02-18 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/i915/intel_breadcrumbs.c

between commit:

  117172c8f9d4 ("drm/i915/breadcrumbs: Ignore unsubmitted signalers")

from Linus' tree and commit:

  b7a3f33bd5ab ("drm/i915/breadcrumbs: Drop request reference for the signaler 
thread")

from the drm tree.

These are basically identical for the conflicting section except that
the former added a line:

GEM_BUG_ON(!i915_gem_request_completed(request));

which I left in.

I fixed it up (see above) 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


pgpFGXl3DBKbP.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2018-02-18 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/i915/i915_pmu.h

between commit:

  4c83f0a788cc ("drm/i915/pmu: Fix sleep under atomic in RC6 readout")

from Linus' tree and commit:

  109ec558370f ("drm/i915/pmu: Only enumerate available counters in sysfs")

from the drm 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/i915/i915_pmu.h
index bb62df15afa4,5a2e013a56bb..
--- a/drivers/gpu/drm/i915/i915_pmu.h
+++ b/drivers/gpu/drm/i915/i915_pmu.h
@@@ -96,10 -94,14 +96,18 @@@ struct i915_pmu 
 * struct intel_engine_cs.
 */
struct i915_pmu_sample sample[__I915_NUM_PMU_SAMPLERS];
 +  /**
 +   * @suspended_jiffies_last: Cached suspend time from PM core.
 +   */
 +  unsigned long suspended_jiffies_last;
+   /**
+* @i915_attr: Memory block holding device attributes.
+*/
+   void *i915_attr;
+   /**
+* @pmu_attr: Memory block holding device attributes.
+*/
+   void *pmu_attr;
  };
  
  #ifdef CONFIG_PERF_EVENTS


pgpQ1z2PC6qsg.pgp
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2018-01-14 Thread Stephen Rothwell
Hi all,

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

  drivers/gpu/drm/tegra/sor.c

between commit:

  d780537f9b49 ("drm/tegra: sor: Fix hang on Tegra124 eDP")

from Linus' tree and commit:

  1087fac18b8e ("drm/tegra: dc: Use direct offset to plane registers")

from the drm tree.

I fixed it up (I just included the comment from the former) 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
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


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

2017-11-23 Thread Stephen Rothwell
Hi all,

FIXME: Add owner of second tree to To:
   Add author(s)/SOB of conflicting commits.

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

  drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c

between commits:

  0290c4ca2536 ("of: overlay: rename identifiers to more reflect what they do")
  24789c5ce5a3 ("of: overlay: detect cases where device tree may become 
corrupt")
  f948d6d8b792 ("of: overlay: avoid race condition between applying multiple 
overlays")

from Linus' tree and commit:

  739acd85ffdb ("drm/tilcdc: Remove obsolete "ti,tilcdc,slave" dts binding 
support")

from the drm tree.

I fixed it up (the latter removed the file, so I did that) 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
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel