<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2023-10-02 06:24, Christian König
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:82d52efe-0daa-e086-dabf-df19d4e95dc3@gmail.com">Am
      29.09.23 um 00:22 schrieb Philip Yang:
      <br>
      <blockquote type="cite">Use ratelimited version of dev_dbg to
        avoid flooding dmesg log. No
        <br>
        functional change.
        <br>
        <br>
        Signed-off-by: Philip Yang <a class="moz-txt-link-rfc2396E" href="mailto:Philip.Yang@amd.com"><Philip.Yang@amd.com></a>
        <br>
        ---
        <br>
          drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c |  2 +-
        <br>
          drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c     | 16
        ++++++++--------
        <br>
          2 files changed, 9 insertions(+), 9 deletions(-)
        <br>
        <br>
        diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
        b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
        <br>
        index 96d601e209b8..6d2878684287 100644
        <br>
        --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
        <br>
        +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
        <br>
        @@ -848,7 +848,7 @@ static void
        amdgpu_vm_pte_update_flags(struct amdgpu_vm_update_params
        *params,
        <br>
                      amdgpu_gmc_override_vm_pte_flags(adev,
        params->vm,
        <br>
                                       addr, &flags);
        <br>
                  else
        <br>
        -            dev_dbg(adev->dev,
        <br>
        +            dev_dbg_ratelimited(adev->dev,
        <br>
                          "override_vm_pte_flags skipped:
        non-contiguous\n");
        <br>
      </blockquote>
      <br>
      I don't see any value in this in the first place. We should
      probably drop the message altogether.
      <br>
    </blockquote>
    ok, I will remove this line then push, thanks.<br>
    <blockquote type="cite" cite="mid:82d52efe-0daa-e086-dabf-df19d4e95dc3@gmail.com">
      <br>
      Christian.
      <br>
      <br>
      <blockquote type="cite">      }
        <br>
          diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
        b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
        <br>
        index 6b15677c0314..ad0d63472e17 100644
        <br>
        --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
        <br>
        +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
        <br>
        @@ -1244,7 +1244,7 @@ static void
        gmc_v9_0_override_vm_pte_flags(struct amdgpu_device *adev,
        <br>
               * the DMA address.
        <br>
               */
        <br>
              if (!adev->ram_is_direct_mapped) {
        <br>
        -        dev_dbg(adev->dev, "RAM is not direct mapped\n");
        <br>
        +        dev_dbg_ratelimited(adev->dev, "RAM is not direct
        mapped\n");
        <br>
                  return;
        <br>
              }
        <br>
          @@ -1253,7 +1253,7 @@ static void
        gmc_v9_0_override_vm_pte_flags(struct amdgpu_device *adev,
        <br>
               */
        <br>
              if ((*flags & AMDGPU_PTE_MTYPE_VG10_MASK) !=
        <br>
                  AMDGPU_PTE_MTYPE_VG10(MTYPE_NC)) {
        <br>
        -        dev_dbg(adev->dev, "MTYPE is not NC\n");
        <br>
        +        dev_dbg_ratelimited(adev->dev, "MTYPE is not NC\n");
        <br>
                  return;
        <br>
              }
        <br>
          @@ -1264,7 +1264,7 @@ static void
        gmc_v9_0_override_vm_pte_flags(struct amdgpu_device *adev,
        <br>
              if (adev->gmc.is_app_apu && vm->mem_id >=
        0) {
        <br>
                  local_node =
        adev->gmc.mem_partitions[vm->mem_id].numa.node;
        <br>
              } else {
        <br>
        -        dev_dbg(adev->dev, "Only native mode APU is
        supported.\n");
        <br>
        +        dev_dbg_ratelimited(adev->dev, "Only native mode APU
        is supported.\n");
        <br>
                  return;
        <br>
              }
        <br>
          @@ -1272,12 +1272,12 @@ static void
        gmc_v9_0_override_vm_pte_flags(struct amdgpu_device *adev,
        <br>
               * page or NUMA nodes.
        <br>
               */
        <br>
              if (!page_is_ram(addr >> PAGE_SHIFT)) {
        <br>
        -        dev_dbg(adev->dev, "Page is not RAM.\n");
        <br>
        +        dev_dbg_ratelimited(adev->dev, "Page is not
        RAM.\n");
        <br>
                  return;
        <br>
              }
        <br>
              nid = pfn_to_nid(addr >> PAGE_SHIFT);
        <br>
        -    dev_dbg(adev->dev, "vm->mem_id=%d, local_node=%d,
        nid=%d\n",
        <br>
        -        vm->mem_id, local_node, nid);
        <br>
        +    dev_dbg_ratelimited(adev->dev, "vm->mem_id=%d,
        local_node=%d, nid=%d\n",
        <br>
        +                vm->mem_id, local_node, nid);
        <br>
              if (nid == local_node) {
        <br>
                  uint64_t old_flags = *flags;
        <br>
                  unsigned int mtype_local = MTYPE_RW;
        <br>
        @@ -1289,8 +1289,8 @@ static void
        gmc_v9_0_override_vm_pte_flags(struct amdgpu_device *adev,
        <br>
                    *flags = (*flags & ~AMDGPU_PTE_MTYPE_VG10_MASK)
        |
        <br>
                       AMDGPU_PTE_MTYPE_VG10(mtype_local);
        <br>
        -        dev_dbg(adev->dev, "flags updated from %llx to
        %llx\n",
        <br>
        -            old_flags, *flags);
        <br>
        +        dev_dbg_ratelimited(adev->dev, "flags updated from
        %llx to %llx\n",
        <br>
        +                    old_flags, *flags);
        <br>
              }
        <br>
          }
        <br>
          </blockquote>
      <br>
    </blockquote>
  </body>
</html>