Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4002766imm; Mon, 18 Jun 2018 07:38:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKDd4kDieASrWpxXRw4EmqcQ6jPtUkP24T8S0ObeFdf6lyuxqIdeIRRZjaLV6WvLnz+K+6M X-Received: by 2002:a63:b147:: with SMTP id g7-v6mr11077615pgp.379.1529332727142; Mon, 18 Jun 2018 07:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529332727; cv=none; d=google.com; s=arc-20160816; b=fTOnq5A3Y1qp9GN7E8vuMjCzwoPpWe8mnqUBgy/jniAYmcA/pbIiBoTpn1zyorFMhW fjj3qc+qhwv3kRlG8LnoaZBKpRA2V0zhvgK9fUX9rJnFVoSYYwJxTSZe1Pkq6afsRy0J Tok1LlmyI1roTNvyzY2h+Qaqalb2p08G4yeAGTVmw1neqBHe48eSWx534yi6B+XmiYVG LWpftPTaOnNA2ifxif/roYW0ZExCFevxJ0IGZuxrZZm89diPUuZUErxzyu/FVb565je+ 5CcY5QoZRq1JBLw16Iur1RPxZqSp70yxkK2L3YPR3MeNvIyRn5S1jOuiLtWYr0ELowdh rdYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=o34j44tVEGj8rQg2aAPlVCkLvR0VvXuTr5Pe55aeq7s=; b=ZNOIE0FO9M9jb+oh5R/bZPMYwi971tSPqRGoi8+zSkZULMPs0NpXUg+66jtEeJrpqB tNbsKkaEqajVZnWt9O7UE5C+h2KlV69XUxADyXitwYKbf2vs+5E82jTlCdmLEzcW88IP 0vDbXFqJu8mCQYMfQGuZE2B5HqNa6OWE6Av08ykD2Z0Q9v4nGICoUd+6Dy1GfjyGtBBl kTb3ocdaN4hgIpfKG8EPULNdmEtkxXPmLmEYCu+bRIdI/CJU7pgP1CmcIyixXMIpYEjc XWVJytLetEToolRSCuq6vX8ZQM/f5NgegsVlgi5ad7z5L6bVd5HkKXbe77sKlPqj0IvC rNbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oejTEKmB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h67-v6si14848274pfh.240.2018.06.18.07.38.32; Mon, 18 Jun 2018 07:38:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oejTEKmB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934944AbeFROhF (ORCPT + 99 others); Mon, 18 Jun 2018 10:37:05 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:51357 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934732AbeFROhD (ORCPT ); Mon, 18 Jun 2018 10:37:03 -0400 Received: by mail-wm0-f65.google.com with SMTP id r15-v6so14492782wmc.1 for ; Mon, 18 Jun 2018 07:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=o34j44tVEGj8rQg2aAPlVCkLvR0VvXuTr5Pe55aeq7s=; b=oejTEKmBkG/tVGFYVi8X8oO/ySqxHKM64rhcYQAmsGeVgC7j/EadWeMjMisR9ZZO+3 EfhgeWOoWkGTGI45HggL+PqlY60HBS4TciPH8WD1qhEtlpVZ7C9KnedWPC70JXgSTvWb k9z4zQo5JL3dAR+qwrC1yu2LbblaB/ZU5W1ypWyxU9j5vJEaggCQtpLJuWh/i2PFJ9Yo ABObDr6M7R/KdS7wqpaqDVctyW78GHyiXMqBBfF3glSUWB4sZAHj9rYQ48ISy9Wr9Fn2 RcV7ILh8SUhE7yq7kJtL3gXQkavVSZP4K+G/ur0Nd/RQUy7ab3iFeTXGydCdDqRiiKG1 STAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=o34j44tVEGj8rQg2aAPlVCkLvR0VvXuTr5Pe55aeq7s=; b=GjrJ8ShI2fliDkB0KJwIF4jXoTakAp7hAbU4MQUQqnE2lqGkeQBCohH4Vt+A+NUvR6 aWnaJjq56NciR3a3TjgdnxbwTX11LAHM2Yvmki3EU812cA66eHmPT0nN67V87vDaz1Xx lUXzYpJirYP45ilYr3mc6wP3Zfej5/9CtOJshFdxofLiIzZ7jI+w975gT1GZZThqGp0v SxNgqzLASxxWsExP0Vqz4wAbU806RwwEUu0H0U5v58/4EJE57AlRa49Jlk3N1xGy3V1n v2AirSWQpqlLFyFji9LCo/+PIbhoGm0R4hKZVh6lmg0u60WKO65Zc7hIftk+c3z9MNOo eELg== X-Gm-Message-State: APt69E28bIyq7VsXk3Klc4EdCr9+wLpJxTLtnN8k+HpBhnZTXHcrnrLV JCEElLEfcpBO/wGUsvRJivBUwQQOCpOEULMLcRE= X-Received: by 2002:a1c:d482:: with SMTP id l124-v6mr8169391wmg.22.1529332622636; Mon, 18 Jun 2018 07:37:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:a3cf:0:0:0:0:0 with HTTP; Mon, 18 Jun 2018 07:37:02 -0700 (PDT) In-Reply-To: <625b2c05-c923-cd5c-cc48-cbc51ba3d3ee@amd.com> References: <20180617085218.7753-1-stefan@agner.ch> <625b2c05-c923-cd5c-cc48-cbc51ba3d3ee@amd.com> From: Alex Deucher Date: Mon, 18 Jun 2018 10:37:02 -0400 Message-ID: Subject: Re: [PATCH] drm/amdgpu: use first uvd instance to avoid clang build error To: James Zhu Cc: Stefan Agner , Alex Deucher , David Airlie , LKML , Maling list - DRI developers , amd-gfx list , James Zhu , =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 17, 2018 at 10:03 PM, James Zhu wrote: > > > On 2018-06-17 04:52 AM, Stefan Agner wrote: >> >> Explicitly use the first uvd instance to avoid a build error when >> using clang 6: >> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1148:52: error: expected ')' >> container_of(work, struct amdgpu_device, >> uvd.inst->idle_work.work); >> ^ >> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1148:3: note: to match this '(' >> container_of(work, struct amdgpu_device, >> uvd.inst->idle_work.work); >> ^ >> ./include/linux/kernel.h:967:21: note: expanded from macro 'container_of' >> ((type *)(__mptr - offsetof(type, member))); }) >> ^ >> ./include/linux/stddef.h:17:32: note: expanded from macro 'offsetof' >> ^ >> ./include/linux/compiler-gcc.h:170:20: note: expanded from macro >> '__compiler_offsetof' >> __builtin_offsetof(a, b) >> ^ >> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:1147:24: error: initializing >> 'struct amdgpu_device *' with an expression of incompatible type >> 'void' >> struct amdgpu_device *adev = >> ^ >> 2 errors generated. >> >> Fixes: 10dd74eac4db ("drm/amdgpu/vg20:Restruct uvd.inst to support >> multiple instances") >> Cc: James Zhu >> Signed-off-by: Stefan Agner >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c >> index bcf68f80bbf0..6666a5888c44 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c >> @@ -1145,7 +1145,7 @@ int amdgpu_uvd_get_destroy_msg(struct amdgpu_ring >> *ring, uint32_t handle, >> static void amdgpu_uvd_idle_work_handler(struct work_struct *work) >> { >> struct amdgpu_device *adev = >> - container_of(work, struct amdgpu_device, >> uvd.inst->idle_work.work); >> + container_of(work, struct amdgpu_device, >> uvd.inst[0].idle_work.work); > > Hi Alex, > If all instances share one idle work from hardware view currently and in the > future , > should we move struct delayed_work idle_work from struct amdgpu_uvd_inst to > struct amdgpu_uvd? Yes, please do. Alex > James >> >> unsigned fences = 0, i, j; >> for (i = 0; i < adev->uvd.num_uvd_inst; ++i) { > > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel