Re: [PATCH] drm/amdgpu/swsmu: fix ARC build errors
On 10/6/20 6:26 AM, Alex Deucher wrote: > We want to use the dev_* functions here rather than the pr_* variants. > Switch to using dev_warn() which mirrors what we do on other asics. > > Fixes the following build errors on ARC: > > ../drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: In function > 'navi10_fill_i2c_req': > ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function > 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] > > ../drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c: In function > 'sienna_cichlid_fill_i2c_req': > ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function > 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] > > Reported-by: kernel test robot > Cc: Randy Dunlap > Cc: Evan Quan > Cc: Vineet Gupta > Cc: linux-snps-...@lists.infradead.org > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c| 14 -- > .../drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c| 14 -- > 2 files changed, 24 insertions(+), 4 deletions(-) Works for me. Thanks. Acked-by: Randy Dunlap # build-tested -- ~Randy ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm/amdgpu: prevent spurious warning
The default auto setting for kcq should not generate a warning. Fixes: a300de40f66b ("drm/amdgpu: introduce a new parameter to configure how many KCQ we want(v5)") Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 5a26894dc635..7f26408c0d76 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1372,7 +1372,9 @@ static int amdgpu_device_check_arguments(struct amdgpu_device *adev) amdgpu_gmc_tmz_set(adev); - if (amdgpu_num_kcq > 8 || amdgpu_num_kcq < 0) { + if (amdgpu_num_kcq == -1) { + amdgpu_num_kcq = 8; + } else if (amdgpu_num_kcq > 8 || amdgpu_num_kcq < 0) { amdgpu_num_kcq = 8; dev_warn(adev->dev, "set kernel compute queue number to 8 due to invalid parameter provided by user\n"); } -- 2.25.4 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm/amdgpu/swsmu: fix ARC build errors
We want to use the dev_* functions here rather than the pr_* variants. Switch to using dev_warn() which mirrors what we do on other asics. Fixes the following build errors on ARC: ../drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: In function 'navi10_fill_i2c_req': ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] ../drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c: In function 'sienna_cichlid_fill_i2c_req': ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] Reported-by: kernel test robot Cc: Randy Dunlap Cc: Evan Quan Cc: Vineet Gupta Cc: linux-snps-...@lists.infradead.org Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c| 14 -- .../drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c| 14 -- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c index 3f1377f28493..8d8081c6bd38 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c @@ -2336,8 +2336,6 @@ static void navi10_fill_i2c_req(SwI2cRequest_t *req, bool write, { int i; - BUG_ON(numbytes > MAX_SW_I2C_COMMANDS); - req->I2CcontrollerPort = 0; req->I2CSpeed = 2; req->SlaveAddress = address; @@ -2375,6 +2373,12 @@ static int navi10_i2c_read_data(struct i2c_adapter *control, struct smu_table_context *smu_table = &adev->smu.smu_table; struct smu_table *table = &smu_table->driver_table; + if (numbytes > MAX_SW_I2C_COMMANDS) { + dev_err(adev->dev, "numbytes requested %d is over max allowed %d\n", + numbytes, MAX_SW_I2C_COMMANDS); + return -EINVAL; + } + memset(&req, 0, sizeof(req)); navi10_fill_i2c_req(&req, false, address, numbytes, data); @@ -2411,6 +2415,12 @@ static int navi10_i2c_write_data(struct i2c_adapter *control, SwI2cRequest_t req; struct amdgpu_device *adev = to_amdgpu_device(control); + if (numbytes > MAX_SW_I2C_COMMANDS) { + dev_err(adev->dev, "numbytes requested %d is over max allowed %d\n", + numbytes, MAX_SW_I2C_COMMANDS); + return -EINVAL; + } + memset(&req, 0, sizeof(req)); navi10_fill_i2c_req(&req, true, address, numbytes, data); diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c index 3c8732f34b1f..c27806fd07e0 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c @@ -2422,8 +2422,6 @@ static void sienna_cichlid_fill_i2c_req(SwI2cRequest_t *req, bool write, { int i; - BUG_ON(numbytes > MAX_SW_I2C_COMMANDS); - req->I2CcontrollerPort = 0; req->I2CSpeed = 2; req->SlaveAddress = address; @@ -2461,6 +2459,12 @@ static int sienna_cichlid_i2c_read_data(struct i2c_adapter *control, struct smu_table_context *smu_table = &adev->smu.smu_table; struct smu_table *table = &smu_table->driver_table; + if (numbytes > MAX_SW_I2C_COMMANDS) { + dev_err(adev->dev, "numbytes requested %d is over max allowed %d\n", + numbytes, MAX_SW_I2C_COMMANDS); + return -EINVAL; + } + memset(&req, 0, sizeof(req)); sienna_cichlid_fill_i2c_req(&req, false, address, numbytes, data); @@ -2497,6 +2501,12 @@ static int sienna_cichlid_i2c_write_data(struct i2c_adapter *control, SwI2cRequest_t req; struct amdgpu_device *adev = to_amdgpu_device(control); + if (numbytes > MAX_SW_I2C_COMMANDS) { + dev_err(adev->dev, "numbytes requested %d is over max allowed %d\n", + numbytes, MAX_SW_I2C_COMMANDS); + return -EINVAL; + } + memset(&req, 0, sizeof(req)); sienna_cichlid_fill_i2c_req(&req, true, address, numbytes, data); -- 2.25.4 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [Freedreno] [RESEND] Requests For Proposals for hosting XDC2021 are now open
Deadline is November 1st, just in a few weeks! Don't forget to submit your XDC 2021 proposal to bo...@foundation.x.org . Sam On Thu, 2020-09-03 at 12:16 -0400, Lyude Paul wrote: > (Including a bunch more emails in the To: that got missed the first > time) > > Hello everyone! > > The X.org board is soliciting proposals to host XDC in 2021. Since > XDC2020 is being held virtually this year, we've decided to host in > either North America or Europe. However, the board is open to other > locations, especially if there's an interesting co-location with > another > conference. > > Of course though, due to the ongoing COVID-19 pandemic it's not yet > clear whether or not it will be possible to host XDC2021 in person. > Because of this, we would like to make it clear that sponsors should > prepare for both the possibility of an in person conference, and the > possibility of a virtual conference. We will work with organizers on > coming up with a deadline for deciding whether or not we'll be going > virtual, likely sometime around July. > > If you're considering hosting XDC, we've assembled a wiki page with > what's generally expected and needed: > > https://www.x.org/wiki/Events/RFP/ > > When submitting your proposal, please make sure to include at least > the > key information about the potential location in question, possible > dates > along with estimated costs. Proposals can be submitted to board at > foundation.x.org until the deadline of November 1st. Additionally, an > quirk early heads-up to the board if you're considering hosting would > be > appreciated, in case we need to adjust the schedule a bit. Also, > earlier > is better since there generally will be a bit of Q&A with organizers. > > And if you just have some questions about what organizing XDC > entails, > please feel free to chat with previous organizers, or someone from > the > board. signature.asc Description: This is a digitally signed message part ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [RFC PATCH] DRM: amd: powerplay: don't undef pr_warn() {causes ARC build errors}
On Mon, 2020-10-05 at 21:50 -0700, Randy Dunlap wrote: > From: Randy Dunlap > > arch/arc/ implements BUG_ON() with BUG(). ARC has its own BUG() > function and that function uses pr_warn() as part of its implementation. > > Several (8) files in amd/powerplay/ #undef various pr_xyz() functions so > that they won't be used by these drivers, since dev_() functions are > preferred here and the #undefs make the pr_() functions unavailable. [] > --- lnx-59-rc7.orig/drivers/gpu/drm/amd/powerplay/navi10_ppt.c > +++ lnx-59-rc7/drivers/gpu/drm/amd/powerplay/navi10_ppt.c > @@ -52,7 +52,7 @@ > * They are more MGPU friendly. > */ > #undef pr_err > -#undef pr_warn > +//#undef pr_warn > #undef pr_info > #undef pr_debug > > --- lnx-59-rc7.orig/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c > +++ lnx-59-rc7/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c > @@ -54,7 +54,7 @@ > * They are more MGPU friendly. > */ > #undef pr_err > -#undef pr_warn > +//#undef pr_warn > #undef pr_info > #undef pr_debug These are bad ideas as all of these pr_ entries may become functions in a near-term future. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[RFC PATCH] DRM: amd: powerplay: don't undef pr_warn() {causes ARC build errors}
From: Randy Dunlap arch/arc/ implements BUG_ON() with BUG(). ARC has its own BUG() function and that function uses pr_warn() as part of its implementation. Several (8) files in amd/powerplay/ #undef various pr_xyz() functions so that they won't be used by these drivers, since dev_() functions are preferred here and the #undefs make the pr_() functions unavailable. Hence the following build errors are reported in ARC builds: ../drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: In function 'navi10_fill_i2c_req': ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] ../drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c: In function 'sienna_cichlid_fill_i2c_req': ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] Fixes: 55084d7f4022 ("drm/amd/powerplay: forbid to use pr_err/warn/info/debug") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Evan Quan Cc: amd-gfx@lists.freedesktop.org Cc: Alex Deucher Cc: Vineet Gupta Cc: linux-snps-...@lists.infradead.org --- Another alternative is for amd/powerplay/ drivers not to use BUG() or BUG_ON(). A third alternative is to ask the ARC developers to implement BUG() without using any pr_() functions. drivers/gpu/drm/amd/powerplay/navi10_ppt.c |2 +- drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- lnx-59-rc7.orig/drivers/gpu/drm/amd/powerplay/navi10_ppt.c +++ lnx-59-rc7/drivers/gpu/drm/amd/powerplay/navi10_ppt.c @@ -52,7 +52,7 @@ * They are more MGPU friendly. */ #undef pr_err -#undef pr_warn +//#undef pr_warn #undef pr_info #undef pr_debug --- lnx-59-rc7.orig/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c +++ lnx-59-rc7/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c @@ -54,7 +54,7 @@ * They are more MGPU friendly. */ #undef pr_err -#undef pr_warn +//#undef pr_warn #undef pr_info #undef pr_debug ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx