AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Salt <devspam@moreofthesa.me.uk>
To: amd-gfx@lists.freedesktop.org
Cc: Darren Salt <devspam@moreofthesa.me.uk>
Subject: [PATCH 1/8] pci: export pci_rebar_get_possible_sizes
Date: Sun, 13 Dec 2020 22:53:16 +0000	[thread overview]
Message-ID: <20201213225323.6752-2-devspam@moreofthesa.me.uk> (raw)
In-Reply-To: <20201213225323.6752-1-devspam@moreofthesa.me.uk>

This is to assist driver modules which do BAR resizing.

Signed-off-by: Darren Salt <devspam@moreofthesa.me.uk>
---
 drivers/pci/pci.c   | 1 +
 drivers/pci/pci.h   | 1 -
 include/linux/pci.h | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index b2fed944903e..2fd88af5e4da 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3566,6 +3566,7 @@ u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar)
 	pci_read_config_dword(pdev, pos + PCI_REBAR_CAP, &cap);
 	return (cap & PCI_REBAR_CAP_SIZES) >> 4;
 }
+EXPORT_SYMBOL(pci_rebar_get_possible_sizes);
 
 /**
  * pci_rebar_get_current_size - get the current size of a BAR
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index fa12f7cbc1a0..dd1398aec6c8 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -609,7 +609,6 @@ int acpi_get_rc_resources(struct device *dev, const char *hid, u16 segment,
 			  struct resource *res);
 #endif
 
-u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar);
 int pci_rebar_get_current_size(struct pci_dev *pdev, int bar);
 int pci_rebar_set_size(struct pci_dev *pdev, int bar, int size);
 static inline u64 pci_rebar_size_to_bytes(int size)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 3ff723124ca7..78a03e2c066f 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1224,6 +1224,7 @@ void pci_update_resource(struct pci_dev *dev, int resno);
 int __must_check pci_assign_resource(struct pci_dev *dev, int i);
 int __must_check pci_reassign_resource(struct pci_dev *dev, int i, resource_size_t add_size, resource_size_t align);
 void pci_release_resource(struct pci_dev *dev, int resno);
+u32 pci_rebar_get_possible_sizes(struct pci_dev *pdev, int bar);
 int __must_check pci_resize_resource(struct pci_dev *dev, int i, int size);
 int pci_select_bars(struct pci_dev *dev, unsigned long flags);
 bool pci_device_is_present(struct pci_dev *pdev);
-- 
2.20.1

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

  reply	other threads:[~2020-12-13 22:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-13 22:53 [PATCH 0/8] amdgpu, pci: improved BAR resizing support Darren Salt
2020-12-13 22:53 ` Darren Salt [this message]
2020-12-13 22:53 ` [PATCH 2/8] pci: add BAR bytes->size helper & expose size->bytes helper Darren Salt
2020-12-13 22:53 ` [PATCH 3/8] amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM (v4) Darren Salt
2020-12-14  8:15   ` Christian König
2020-12-13 22:53 ` [PATCH 4/8] amdgpu: limit maximum BAR0 size when attempting to enlarge (v2) Darren Salt
2020-12-13 22:53 ` [PATCH 5/8] pci: allow for overriding the list of advertised BAR sizes Darren Salt
2020-12-13 22:53 ` [PATCH 6/8] amdgpu: allow overriding of the GPU's list of supported BAR sizes (v3) Darren Salt
2020-12-13 22:53 ` [PATCH 7/8] amdgpu: implement a BAR size quirks list Darren Salt
2020-12-13 22:53 ` [PATCH 8/8] amdgpu: add a BAR size quirk for Sapphire RX 5600 XT Pulse Darren Salt
2020-12-13 23:02 ` [PATCH 0/8] amdgpu, pci: improved BAR resizing support Darren Salt
  -- strict thread matches above, loose matches on Subject: below --
2020-12-15  1:08 Darren Salt
2020-12-15  1:08 ` [PATCH 1/8] pci: export pci_rebar_get_possible_sizes Darren Salt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201213225323.6752-2-devspam@moreofthesa.me.uk \
    --to=devspam@moreofthesa.me.uk \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox