All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 4/4] PCI: add a REBAR size quirk for Sapphire RX 5600 XT Pulse.
@ 2021-01-05 17:34 kernel test robot
  0 siblings, 0 replies; 21+ messages in thread
From: kernel test robot @ 2021-01-05 17:34 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 3864 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210105134404.1545-5-christian.koenig@amd.com>
References: <20210105134404.1545-5-christian.koenig@amd.com>
TO: "Christian König" <ckoenig.leichtzumerken@gmail.com>
TO: bhelgaas(a)google.com
CC: devspam(a)moreofthesa.me.uk
CC: linux-pci(a)vger.kernel.org
CC: dri-devel(a)lists.freedesktop.org
CC: amd-gfx(a)lists.freedesktop.org

Hi "Christian,

I love your patch! Perhaps something to improve:

[auto build test WARNING on pci/next]
[also build test WARNING on linus/master v5.11-rc2 next-20210104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Christian-K-nig/pci-export-pci_rebar_get_possible_sizes/20210105-224446
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
config: x86_64-randconfig-m001-20210105 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/pci/pci.c:3611 pci_rebar_get_possible_sizes() warn: statement has no effect 22

vim +3611 drivers/pci/pci.c

276b738deb5bf85 Christian König 2017-10-24  3587  
276b738deb5bf85 Christian König 2017-10-24  3588  /**
276b738deb5bf85 Christian König 2017-10-24  3589   * pci_rebar_get_possible_sizes - get possible sizes for BAR
276b738deb5bf85 Christian König 2017-10-24  3590   * @pdev: PCI device
276b738deb5bf85 Christian König 2017-10-24  3591   * @bar: BAR to query
276b738deb5bf85 Christian König 2017-10-24  3592   *
276b738deb5bf85 Christian König 2017-10-24  3593   * Get the possible sizes of a resizable BAR as bitmask defined in the spec
276b738deb5bf85 Christian König 2017-10-24  3594   * (bit 0=1MB, bit 19=512GB). Returns 0 if BAR isn't resizable.
276b738deb5bf85 Christian König 2017-10-24  3595   */
276b738deb5bf85 Christian König 2017-10-24  3596  u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar)
276b738deb5bf85 Christian König 2017-10-24  3597  {
276b738deb5bf85 Christian König 2017-10-24  3598  	int pos;
276b738deb5bf85 Christian König 2017-10-24  3599  	u32 cap;
276b738deb5bf85 Christian König 2017-10-24  3600  
276b738deb5bf85 Christian König 2017-10-24  3601  	pos = pci_rebar_find_pos(pdev, bar);
276b738deb5bf85 Christian König 2017-10-24  3602  	if (pos < 0)
276b738deb5bf85 Christian König 2017-10-24  3603  		return 0;
276b738deb5bf85 Christian König 2017-10-24  3604  
276b738deb5bf85 Christian König 2017-10-24  3605  	pci_read_config_dword(pdev, pos + PCI_REBAR_CAP, &cap);
6838a45fc2394ec Christian König 2021-01-05  3606  	cap = (cap & PCI_REBAR_CAP_SIZES) >> 4;
6838a45fc2394ec Christian König 2021-01-05  3607  
6838a45fc2394ec Christian König 2021-01-05  3608  	/* Sapphire RX 5600 XT Pulse has an invalid cap dword for BAR 0 */
6838a45fc2394ec Christian König 2021-01-05  3609  	if (pdev->vendor == PCI_VENDOR_ID_ATI && pdev->device == 0x731f &&
6838a45fc2394ec Christian König 2021-01-05  3610  	    bar == 0 && cap == 0x700)
6838a45fc2394ec Christian König 2021-01-05 @3611  		cap == 0x7f00;
6838a45fc2394ec Christian König 2021-01-05  3612  
6838a45fc2394ec Christian König 2021-01-05  3613  	return cap;
276b738deb5bf85 Christian König 2017-10-24  3614  }
8dc3a051d9d6660 Darren Salt     2021-01-05  3615  EXPORT_SYMBOL(pci_rebar_get_possible_sizes);
276b738deb5bf85 Christian König 2017-10-24  3616  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32557 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread
* [PATCH 0/4] A PCI quirk for resizable BAR 0 on Navi10
@ 2021-01-07 17:50 Nirmoy Das
  2021-01-07 17:50   ` Nirmoy Das
  0 siblings, 1 reply; 21+ messages in thread
From: Nirmoy Das @ 2021-01-07 17:50 UTC (permalink / raw)
  To: bhelgaas
  Cc: ckoenig.leichtzumerken, linux-pci, dri-devel, devspam, Nirmoy Das

Hi Bjorn,

I cleaned up the patch series[1] that Christian sent
earlier to fix wrongly exported resizable bar
capability dword by VBIOS of RX 5600  XT Pulse card.

I didn't split #2 patch instead merged amdgpu changes
of #2 patch to #3 patch and removed changes related to
pci_rebar_size_to_bytes() as it isn't needed anymore.

Apart from that I clean up rest of the patches as you suggested.

Please let me know if I missed something.

Regards,
Nirmoy


[1] https://www.spinics.net/lists/linux-pci/msg103422.html

--
2.29.2


^ permalink raw reply	[flat|nested] 21+ messages in thread
* A PCI quirk for resizeable BAR 0 on Navi10
@ 2021-01-05 13:44 Christian König
  2021-01-05 13:44   ` Christian König
  0 siblings, 1 reply; 21+ messages in thread
From: Christian König @ 2021-01-05 13:44 UTC (permalink / raw)
  To: bhelgaas; +Cc: devspam, linux-pci, dri-devel, amd-gfx

Hi Bjorn,

Darren stumbled over an AMD GPU with nonsense in it's resizeable BAR capability dword.

This is most likely fixable with a VBIOS update, but we already sold quite a bunch of those boards with the problem.

The driver still loads without this, but the performance isn't the best.

Do you have any objection to merge this through the drm branch?

Thanks in advance,
Christian.


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2021-01-08  7:49 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-05 17:34 [PATCH 4/4] PCI: add a REBAR size quirk for Sapphire RX 5600 XT Pulse kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-01-07 17:50 [PATCH 0/4] A PCI quirk for resizable BAR 0 on Navi10 Nirmoy Das
2021-01-07 17:50 ` [PATCH 4/4] PCI: Add a REBAR size quirk for Sapphire RX 5600 XT Pulse Nirmoy Das
2021-01-07 17:50   ` Nirmoy Das
2021-01-07 21:32   ` Bjorn Helgaas
2021-01-07 21:32     ` Bjorn Helgaas
2021-01-07 20:25     ` Christian König
2021-01-07 20:25       ` Christian König
2021-01-05 13:44 A PCI quirk for resizeable BAR 0 on Navi10 Christian König
2021-01-05 13:44 ` [PATCH 4/4] PCI: add a REBAR size quirk for Sapphire RX 5600 XT Pulse Christian König
2021-01-05 13:44   ` Christian König
2021-01-05 13:44   ` Christian König
2021-01-05 16:11   ` Ilia Mirkin
2021-01-05 16:11     ` Ilia Mirkin
2021-01-05 16:11     ` Ilia Mirkin
2021-01-05 17:43     ` Christian König
2021-01-05 17:43       ` Christian König
2021-01-05 17:43       ` Christian König
2021-01-05 17:28   ` kernel test robot
2021-01-05 17:28     ` kernel test robot
2021-01-05 17:28     ` kernel test robot
2021-01-05 17:28     ` kernel test robot
2021-01-05 18:41   ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.