* [PATCH V4 21/26] backlight: deprecate pci_get_bus_and_slot() [not found] <1513661883-28662-1-git-send-email-okaya@codeaurora.org> @ 2017-12-19 5:37 ` Sinan Kaya 2017-12-19 8:51 ` Lee Jones 2017-12-19 5:37 ` [PATCH V4 22/26] video: fbdev: intelfb: " Sinan Kaya ` (2 subsequent siblings) 3 siblings, 1 reply; 11+ messages in thread From: Sinan Kaya @ 2017-12-19 5:37 UTC (permalink / raw) To: linux-pci, timur Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, Lee Jones, Daniel Thompson, Jingoo Han, Bartlomiej Zolnierkiewicz, open list:FRAMEBUFFER LAYER, open list:FRAMEBUFFER LAYER, open list pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as where a PCI device is present. This restricts the device drivers to be reused for other domain numbers. Getting ready to remove pci_get_bus_and_slot() function in favor of pci_get_domain_bus_and_slot(). Hard-coding the domain as 0. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Acked-by: Jingoo Han <jingoohan1@gmail.com> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> --- drivers/video/backlight/apple_bl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/apple_bl.c b/drivers/video/backlight/apple_bl.c index d843296..6a34ab9 100644 --- a/drivers/video/backlight/apple_bl.c +++ b/drivers/video/backlight/apple_bl.c @@ -143,7 +143,7 @@ static int apple_bl_add(struct acpi_device *dev) struct pci_dev *host; int intensity; - host = pci_get_bus_and_slot(0, 0); + host = pci_get_domain_bus_and_slot(0, 0, 0); if (!host) { pr_err("unable to find PCI host\n"); -- 1.9.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH V4 21/26] backlight: deprecate pci_get_bus_and_slot() 2017-12-19 5:37 ` [PATCH V4 21/26] backlight: deprecate pci_get_bus_and_slot() Sinan Kaya @ 2017-12-19 8:51 ` Lee Jones 0 siblings, 0 replies; 11+ messages in thread From: Lee Jones @ 2017-12-19 8:51 UTC (permalink / raw) To: Sinan Kaya Cc: linux-pci, timur, linux-arm-msm, linux-arm-kernel, Daniel Thompson, Jingoo Han, Bartlomiej Zolnierkiewicz, open list:FRAMEBUFFER LAYER, open list:FRAMEBUFFER LAYER, open list On Tue, 19 Dec 2017, Sinan Kaya wrote: > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as > where a PCI device is present. This restricts the device drivers to be > reused for other domain numbers. > > Getting ready to remove pci_get_bus_and_slot() function in favor of > pci_get_domain_bus_and_slot(). > > Hard-coding the domain as 0. > > Signed-off-by: Sinan Kaya <okaya@codeaurora.org> > Acked-by: Jingoo Han <jingoohan1@gmail.com> > Acked-by: Daniel Thompson <daniel.thompson@linaro.org> > --- > drivers/video/backlight/apple_bl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied, thanks. -- Lee Jones Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH V4 22/26] video: fbdev: intelfb: deprecate pci_get_bus_and_slot() [not found] <1513661883-28662-1-git-send-email-okaya@codeaurora.org> 2017-12-19 5:37 ` [PATCH V4 21/26] backlight: deprecate pci_get_bus_and_slot() Sinan Kaya @ 2017-12-19 5:37 ` Sinan Kaya 2018-01-02 13:38 ` Sinan Kaya 2017-12-19 5:37 ` [PATCH V4 23/26] video: fbdev: nvidia: " Sinan Kaya 2017-12-19 5:38 ` [PATCH V4 24/26] video: fbdev: riva: " Sinan Kaya 3 siblings, 1 reply; 11+ messages in thread From: Sinan Kaya @ 2017-12-19 5:37 UTC (permalink / raw) To: linux-pci, timur Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, Maik Broemme, Bartlomiej Zolnierkiewicz, open list:INTEL FRAMEBUFFER DRIVER excluding 810 and 815, open list:FRAMEBUFFER LAYER, open list pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as where a PCI device is present. This restricts the device drivers to be reused for other domain numbers. Getting ready to remove pci_get_bus_and_slot() function in favor of pci_get_domain_bus_and_slot(). Find the domain number from pdev. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> --- drivers/video/fbdev/intelfb/intelfbhw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/intelfb/intelfbhw.c b/drivers/video/fbdev/intelfb/intelfbhw.c index 83fec57..57aff74 100644 --- a/drivers/video/fbdev/intelfb/intelfbhw.c +++ b/drivers/video/fbdev/intelfb/intelfbhw.c @@ -181,7 +181,9 @@ int intelfbhw_get_memory(struct pci_dev *pdev, int *aperture_size, return 1; /* Find the bridge device. It is always 0:0.0 */ - if (!(bridge_dev = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0)))) { + bridge_dev = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus), 0, + PCI_DEVFN(0, 0)); + if (!bridge_dev) { ERR_MSG("cannot find bridge device\n"); return 1; } -- 1.9.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH V4 22/26] video: fbdev: intelfb: deprecate pci_get_bus_and_slot() 2017-12-19 5:37 ` [PATCH V4 22/26] video: fbdev: intelfb: " Sinan Kaya @ 2018-01-02 13:38 ` Sinan Kaya 2018-01-03 11:18 ` Bartlomiej Zolnierkiewicz 0 siblings, 1 reply; 11+ messages in thread From: Sinan Kaya @ 2018-01-02 13:38 UTC (permalink / raw) To: linux-pci, timur Cc: linux-arm-msm, linux-arm-kernel, Maik Broemme, Bartlomiej Zolnierkiewicz, open list:INTEL FRAMEBUFFER DRIVER (excluding 810 and 815), open list:FRAMEBUFFER LAYER, open list On 12/19/2017 12:37 AM, Sinan Kaya wrote: > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as > where a PCI device is present. This restricts the device drivers to be > reused for other domain numbers. > > Getting ready to remove pci_get_bus_and_slot() function in favor of > pci_get_domain_bus_and_slot(). > > Find the domain number from pdev. > > Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Any feedback here ? most of the remaining patches have the ACK except these. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 22/26] video: fbdev: intelfb: deprecate pci_get_bus_and_slot() 2018-01-02 13:38 ` Sinan Kaya @ 2018-01-03 11:18 ` Bartlomiej Zolnierkiewicz 0 siblings, 0 replies; 11+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2018-01-03 11:18 UTC (permalink / raw) To: Sinan Kaya Cc: linux-pci, timur, linux-arm-msm, linux-arm-kernel, Maik Broemme, open list:INTEL FRAMEBUFFER DRIVER (excluding 810 and 815), open list:FRAMEBUFFER LAYER, open list On Tuesday, January 02, 2018 08:38:24 AM Sinan Kaya wrote: > On 12/19/2017 12:37 AM, Sinan Kaya wrote: > > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as > > where a PCI device is present. This restricts the device drivers to be > > reused for other domain numbers. > > > > Getting ready to remove pci_get_bus_and_slot() function in favor of > > pci_get_domain_bus_and_slot(). > > > > Find the domain number from pdev. > > > > Signed-off-by: Sinan Kaya <okaya@codeaurora.org> > > Any feedback here ? most of the remaining patches have the ACK except these. Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH V4 23/26] video: fbdev: nvidia: deprecate pci_get_bus_and_slot() [not found] <1513661883-28662-1-git-send-email-okaya@codeaurora.org> 2017-12-19 5:37 ` [PATCH V4 21/26] backlight: deprecate pci_get_bus_and_slot() Sinan Kaya 2017-12-19 5:37 ` [PATCH V4 22/26] video: fbdev: intelfb: " Sinan Kaya @ 2017-12-19 5:37 ` Sinan Kaya 2018-01-02 13:38 ` Sinan Kaya 2017-12-19 5:38 ` [PATCH V4 24/26] video: fbdev: riva: " Sinan Kaya 3 siblings, 1 reply; 11+ messages in thread From: Sinan Kaya @ 2017-12-19 5:37 UTC (permalink / raw) To: linux-pci, timur Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, Antonino Daplas, Bartlomiej Zolnierkiewicz, open list:NVIDIA rivafb and nvidiafb FRAMEBUFFER DRIVER, open list:FRAMEBUFFER LAYER, open list pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as where a PCI device is present. This restricts the device drivers to be reused for other domain numbers. Getting ready to remove pci_get_bus_and_slot() function in favor of pci_get_domain_bus_and_slot(). struct nvidia_par has a pointer to struct pci_dev. Use the pci_dev member to extract the domain information and pass it to pci_get_domain_bus_and_slot() function. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> --- drivers/video/fbdev/nvidia/nv_hw.c | 11 ++++++----- drivers/video/fbdev/nvidia/nv_setup.c | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/nvidia/nv_hw.c b/drivers/video/fbdev/nvidia/nv_hw.c index 81c80ac..8335da4 100644 --- a/drivers/video/fbdev/nvidia/nv_hw.c +++ b/drivers/video/fbdev/nvidia/nv_hw.c @@ -683,10 +683,11 @@ static void nForceUpdateArbitrationSettings(unsigned VClk, nv10_sim_state sim_data; unsigned int M, N, P, pll, MClk, NVClk, memctrl; struct pci_dev *dev; + int domain = pci_domain_nr(par->pci_dev->bus); if ((par->Chipset & 0x0FF0) = 0x01A0) { unsigned int uMClkPostDiv; - dev = pci_get_bus_and_slot(0, 3); + dev = pci_get_domain_bus_and_slot(domain, 0, 3); pci_read_config_dword(dev, 0x6C, &uMClkPostDiv); uMClkPostDiv = (uMClkPostDiv >> 8) & 0xf; @@ -694,7 +695,7 @@ static void nForceUpdateArbitrationSettings(unsigned VClk, uMClkPostDiv = 4; MClk = 400000 / uMClkPostDiv; } else { - dev = pci_get_bus_and_slot(0, 5); + dev = pci_get_domain_bus_and_slot(domain, 0, 5); pci_read_config_dword(dev, 0x4c, &MClk); MClk /= 1000; } @@ -707,13 +708,13 @@ static void nForceUpdateArbitrationSettings(unsigned VClk, sim_data.pix_bpp = (char)pixelDepth; sim_data.enable_video = 0; sim_data.enable_mp = 0; - dev = pci_get_bus_and_slot(0, 1); + dev = pci_get_domain_bus_and_slot(domain, 0, 1); pci_read_config_dword(dev, 0x7C, &sim_data.memory_type); pci_dev_put(dev); sim_data.memory_type = (sim_data.memory_type >> 12) & 1; sim_data.memory_width = 64; - dev = pci_get_bus_and_slot(0, 3); + dev = pci_get_domain_bus_and_slot(domain, 0, 3); pci_read_config_dword(dev, 0, &memctrl); pci_dev_put(dev); memctrl >>= 16; @@ -721,7 +722,7 @@ static void nForceUpdateArbitrationSettings(unsigned VClk, if ((memctrl = 0x1A9) || (memctrl = 0x1AB) || (memctrl = 0x1ED)) { u32 dimm[3]; - dev = pci_get_bus_and_slot(0, 2); + dev = pci_get_domain_bus_and_slot(domain, 0, 2); pci_read_config_dword(dev, 0x40, &dimm[0]); dimm[0] = (dimm[0] >> 8) & 0x4f; pci_read_config_dword(dev, 0x44, &dimm[1]); diff --git a/drivers/video/fbdev/nvidia/nv_setup.c b/drivers/video/fbdev/nvidia/nv_setup.c index 2f2e162..b17acd2 100644 --- a/drivers/video/fbdev/nvidia/nv_setup.c +++ b/drivers/video/fbdev/nvidia/nv_setup.c @@ -264,7 +264,8 @@ static void nv10GetConfig(struct nvidia_par *par) } #endif - dev = pci_get_bus_and_slot(0, 1); + dev = pci_get_domain_bus_and_slot(pci_domain_nr(par->pci_dev->bus), + 0, 1); if ((par->Chipset & 0xffff) = 0x01a0) { u32 amt; -- 1.9.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH V4 23/26] video: fbdev: nvidia: deprecate pci_get_bus_and_slot() 2017-12-19 5:37 ` [PATCH V4 23/26] video: fbdev: nvidia: " Sinan Kaya @ 2018-01-02 13:38 ` Sinan Kaya 2018-01-03 11:18 ` Bartlomiej Zolnierkiewicz 0 siblings, 1 reply; 11+ messages in thread From: Sinan Kaya @ 2018-01-02 13:38 UTC (permalink / raw) To: linux-pci, timur Cc: linux-arm-msm, linux-arm-kernel, Antonino Daplas, Bartlomiej Zolnierkiewicz, open list:NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER, open list:FRAMEBUFFER LAYER, open list On 12/19/2017 12:37 AM, Sinan Kaya wrote: > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as > where a PCI device is present. This restricts the device drivers to be > reused for other domain numbers. > > Getting ready to remove pci_get_bus_and_slot() function in favor of > pci_get_domain_bus_and_slot(). > > struct nvidia_par has a pointer to struct pci_dev. Use the pci_dev > member to extract the domain information and pass it to > pci_get_domain_bus_and_slot() function. > > Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Any feedback here ? most of the remaining patches have the ACK except these. -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 23/26] video: fbdev: nvidia: deprecate pci_get_bus_and_slot() 2018-01-02 13:38 ` Sinan Kaya @ 2018-01-03 11:18 ` Bartlomiej Zolnierkiewicz 0 siblings, 0 replies; 11+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2018-01-03 11:18 UTC (permalink / raw) To: Sinan Kaya Cc: open list:NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER, linux-pci, timur, open list, open list:FRAMEBUFFER LAYER, linux-arm-msm, linux-arm-kernel On Tuesday, January 02, 2018 08:38:03 AM Sinan Kaya wrote: > On 12/19/2017 12:37 AM, Sinan Kaya wrote: > > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as > > where a PCI device is present. This restricts the device drivers to be > > reused for other domain numbers. > > > > Getting ready to remove pci_get_bus_and_slot() function in favor of > > pci_get_domain_bus_and_slot(). > > > > struct nvidia_par has a pointer to struct pci_dev. Use the pci_dev > > member to extract the domain information and pass it to > > pci_get_domain_bus_and_slot() function. > > > > Signed-off-by: Sinan Kaya <okaya@codeaurora.org> > > Any feedback here ? most of the remaining patches have the ACK except these. Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH V4 24/26] video: fbdev: riva: deprecate pci_get_bus_and_slot() [not found] <1513661883-28662-1-git-send-email-okaya@codeaurora.org> ` (2 preceding siblings ...) 2017-12-19 5:37 ` [PATCH V4 23/26] video: fbdev: nvidia: " Sinan Kaya @ 2017-12-19 5:38 ` Sinan Kaya 2018-01-02 13:37 ` Sinan Kaya 3 siblings, 1 reply; 11+ messages in thread From: Sinan Kaya @ 2017-12-19 5:38 UTC (permalink / raw) To: linux-pci, timur Cc: linux-arm-msm, linux-arm-kernel, Sinan Kaya, Antonino Daplas, Bartlomiej Zolnierkiewicz, open list:NVIDIA rivafb and nvidiafb FRAMEBUFFER DRIVER, open list:FRAMEBUFFER LAYER, open list pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as where a PCI device is present. This restricts the device drivers to be reused for other domain numbers. Getting ready to remove pci_get_bus_and_slot() function in favor of pci_get_domain_bus_and_slot(). struct riva_par has a pointer to struct pci_dev. Use the pci_dev member to extract the domain information. Change the function signature for CalcStateExt and RivaGetConfig to pass in struct pci_dev in addition to RIVA_HW_INST so that code inside the riva_hw.c can also calculate domain number and pass it to pci_get_domain_bus_and_slot(). Signed-off-by: Sinan Kaya <okaya@codeaurora.org> --- drivers/video/fbdev/riva/fbdev.c | 2 +- drivers/video/fbdev/riva/nv_driver.c | 7 ++++--- drivers/video/fbdev/riva/riva_hw.c | 20 +++++++++++++------- drivers/video/fbdev/riva/riva_hw.h | 3 ++- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/drivers/video/fbdev/riva/fbdev.c b/drivers/video/fbdev/riva/fbdev.c index 1ea78bb..ff82823 100644 --- a/drivers/video/fbdev/riva/fbdev.c +++ b/drivers/video/fbdev/riva/fbdev.c @@ -780,7 +780,7 @@ static int riva_load_video_mode(struct fb_info *info) else newmode.misc_output |= 0x80; - rc = CalcStateExt(&par->riva, &newmode.ext, bpp, width, + rc = CalcStateExt(&par->riva, &newmode.ext, par->pdev, bpp, width, hDisplaySize, height, dotClock); if (rc) goto out; diff --git a/drivers/video/fbdev/riva/nv_driver.c b/drivers/video/fbdev/riva/nv_driver.c index f3694cf..a3d9c66 100644 --- a/drivers/video/fbdev/riva/nv_driver.c +++ b/drivers/video/fbdev/riva/nv_driver.c @@ -159,6 +159,7 @@ unsigned long riva_get_memlen(struct riva_par *par) unsigned int chipset = par->Chipset; struct pci_dev* dev; u32 amt; + int domain = pci_domain_nr(par->pdev->bus); switch (chip->Architecture) { case NV_ARCH_03: @@ -226,12 +227,12 @@ unsigned long riva_get_memlen(struct riva_par *par) case NV_ARCH_30: if(chipset = NV_CHIP_IGEFORCE2) { - dev = pci_get_bus_and_slot(0, 1); + dev = pci_get_domain_bus_and_slot(domain, 0, 1); pci_read_config_dword(dev, 0x7C, &amt); pci_dev_put(dev); memlen = (((amt >> 6) & 31) + 1) * 1024; } else if (chipset = NV_CHIP_0x01F0) { - dev = pci_get_bus_and_slot(0, 1); + dev = pci_get_domain_bus_and_slot(domain, 0, 1); pci_read_config_dword(dev, 0x84, &amt); pci_dev_put(dev); memlen = (((amt >> 4) & 127) + 1) * 1024; @@ -417,6 +418,6 @@ unsigned long riva_get_maxdclk(struct riva_par *par) } par->riva.flatPanel = (par->FlatPanel > 0) ? TRUE : FALSE; - RivaGetConfig(&par->riva, par->Chipset); + RivaGetConfig(&par->riva, par->pdev, par->Chipset); } diff --git a/drivers/video/fbdev/riva/riva_hw.c b/drivers/video/fbdev/riva/riva_hw.c index 8bdf37f..0601c13 100644 --- a/drivers/video/fbdev/riva/riva_hw.c +++ b/drivers/video/fbdev/riva/riva_hw.c @@ -1108,7 +1108,8 @@ static char nv3_get_param(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_ar unsigned pixelDepth, unsigned *burst, unsigned *lwm, - RIVA_HW_INST *chip + RIVA_HW_INST *chip, + struct pci_dev *pdev ) { nv10_fifo_info fifo_data; @@ -1116,8 +1117,9 @@ static char nv3_get_param(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_ar unsigned int M, N, P, pll, MClk, NVClk; unsigned int uMClkPostDiv; struct pci_dev *dev; + int domain = pci_domain_nr(pdev->bus); - dev = pci_get_bus_and_slot(0, 3); + dev = pci_get_domain_bus_and_slot(domain, 0, 3); pci_read_config_dword(dev, 0x6C, &uMClkPostDiv); pci_dev_put(dev); uMClkPostDiv = (uMClkPostDiv >> 8) & 0xf; @@ -1132,7 +1134,7 @@ static char nv3_get_param(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_ar sim_data.enable_video = 0; sim_data.enable_mp = 0; - dev = pci_get_bus_and_slot(0, 1); + dev = pci_get_domain_bus_and_slot(domain, 0, 1); pci_read_config_dword(dev, 0x7C, &sim_data.memory_type); pci_dev_put(dev); sim_data.memory_type = (sim_data.memory_type >> 12) & 1; @@ -1234,6 +1236,7 @@ static char nv3_get_param(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_ar ( RIVA_HW_INST *chip, RIVA_HW_STATE *state, + struct pci_dev *pdev, int bpp, int width, int hDisplaySize, @@ -1300,7 +1303,7 @@ static char nv3_get_param(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_ar pixelDepth * 8, &(state->arbitration0), &(state->arbitration1), - chip); + chip, pdev); } else { nv10UpdateArbitrationSettings(VClk, pixelDepth * 8, @@ -2102,10 +2105,12 @@ static char nv3_get_param(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_ar static void nv10GetConfig ( RIVA_HW_INST *chip, + struct pci_dev *pdev, unsigned int chipset ) { struct pci_dev* dev; + int domain = pci_domain_nr(pdev->bus); u32 amt; #ifdef __BIG_ENDIAN @@ -2118,12 +2123,12 @@ static char nv3_get_param(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_ar * Fill in chip configuration. */ if(chipset = NV_CHIP_IGEFORCE2) { - dev = pci_get_bus_and_slot(0, 1); + dev = pci_get_domain_bus_and_slot(domain, 0, 1); pci_read_config_dword(dev, 0x7C, &amt); pci_dev_put(dev); chip->RamAmountKBytes = (((amt >> 6) & 31) + 1) * 1024; } else if(chipset = NV_CHIP_0x01F0) { - dev = pci_get_bus_and_slot(0, 1); + dev = pci_get_domain_bus_and_slot(domain, 0, 1); pci_read_config_dword(dev, 0x84, &amt); pci_dev_put(dev); chip->RamAmountKBytes = (((amt >> 4) & 127) + 1) * 1024; @@ -2224,6 +2229,7 @@ static char nv3_get_param(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_ar int RivaGetConfig ( RIVA_HW_INST *chip, + struct pci_dev *pdev, unsigned int chipset ) { @@ -2245,7 +2251,7 @@ static char nv3_get_param(nv3_fifo_info *res_info, nv3_sim_state * state, nv3_ar case NV_ARCH_10: case NV_ARCH_20: case NV_ARCH_30: - nv10GetConfig(chip, chipset); + nv10GetConfig(chip, pdev, chipset); break; default: return (-1); diff --git a/drivers/video/fbdev/riva/riva_hw.h b/drivers/video/fbdev/riva/riva_hw.h index c2769f7..5e7b354 100644 --- a/drivers/video/fbdev/riva/riva_hw.h +++ b/drivers/video/fbdev/riva/riva_hw.h @@ -536,6 +536,7 @@ ( RIVA_HW_INST *chip, RIVA_HW_STATE *state, + struct pci_dev *pdev, int bpp, int width, int hDisplaySize, @@ -546,7 +547,7 @@ /* * External routines. */ -int RivaGetConfig(RIVA_HW_INST *, unsigned int); +int RivaGetConfig(RIVA_HW_INST *chip, struct pci_dev *pdev, unsigned int c); /* * FIFO Free Count. Should attempt to yield processor if RIVA is busy. */ -- 1.9.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH V4 24/26] video: fbdev: riva: deprecate pci_get_bus_and_slot() 2017-12-19 5:38 ` [PATCH V4 24/26] video: fbdev: riva: " Sinan Kaya @ 2018-01-02 13:37 ` Sinan Kaya 2018-01-03 11:18 ` Bartlomiej Zolnierkiewicz 0 siblings, 1 reply; 11+ messages in thread From: Sinan Kaya @ 2018-01-02 13:37 UTC (permalink / raw) To: linux-pci, timur Cc: linux-arm-msm, linux-arm-kernel, Antonino Daplas, Bartlomiej Zolnierkiewicz, open list:NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER, open list:FRAMEBUFFER LAYER, open list On 12/19/2017 12:38 AM, Sinan Kaya wrote: > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as > where a PCI device is present. This restricts the device drivers to be > reused for other domain numbers. > > Getting ready to remove pci_get_bus_and_slot() function in favor of > pci_get_domain_bus_and_slot(). > > struct riva_par has a pointer to struct pci_dev. Use the pci_dev member > to extract the domain information. > > Change the function signature for CalcStateExt and RivaGetConfig to pass > in struct pci_dev in addition to RIVA_HW_INST so that code inside the > riva_hw.c can also calculate domain number and pass it to > pci_get_domain_bus_and_slot(). > > Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Any feedback here, most of the remaining patches have the ACK except these? -- Sinan Kaya Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V4 24/26] video: fbdev: riva: deprecate pci_get_bus_and_slot() 2018-01-02 13:37 ` Sinan Kaya @ 2018-01-03 11:18 ` Bartlomiej Zolnierkiewicz 0 siblings, 0 replies; 11+ messages in thread From: Bartlomiej Zolnierkiewicz @ 2018-01-03 11:18 UTC (permalink / raw) To: Sinan Kaya Cc: open list:NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER, linux-pci, timur, open list, open list:FRAMEBUFFER LAYER, linux-arm-msm, linux-arm-kernel On Tuesday, January 02, 2018 08:37:32 AM Sinan Kaya wrote: > On 12/19/2017 12:38 AM, Sinan Kaya wrote: > > pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as > > where a PCI device is present. This restricts the device drivers to be > > reused for other domain numbers. > > > > Getting ready to remove pci_get_bus_and_slot() function in favor of > > pci_get_domain_bus_and_slot(). > > > > struct riva_par has a pointer to struct pci_dev. Use the pci_dev member > > to extract the domain information. > > > > Change the function signature for CalcStateExt and RivaGetConfig to pass > > in struct pci_dev in addition to RIVA_HW_INST so that code inside the > > riva_hw.c can also calculate domain number and pass it to > > pci_get_domain_bus_and_slot(). > > > > Signed-off-by: Sinan Kaya <okaya@codeaurora.org> > > Any feedback here, most of the remaining patches have the ACK except these? Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-01-03 11:18 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1513661883-28662-1-git-send-email-okaya@codeaurora.org> 2017-12-19 5:37 ` [PATCH V4 21/26] backlight: deprecate pci_get_bus_and_slot() Sinan Kaya 2017-12-19 8:51 ` Lee Jones 2017-12-19 5:37 ` [PATCH V4 22/26] video: fbdev: intelfb: " Sinan Kaya 2018-01-02 13:38 ` Sinan Kaya 2018-01-03 11:18 ` Bartlomiej Zolnierkiewicz 2017-12-19 5:37 ` [PATCH V4 23/26] video: fbdev: nvidia: " Sinan Kaya 2018-01-02 13:38 ` Sinan Kaya 2018-01-03 11:18 ` Bartlomiej Zolnierkiewicz 2017-12-19 5:38 ` [PATCH V4 24/26] video: fbdev: riva: " Sinan Kaya 2018-01-02 13:37 ` Sinan Kaya 2018-01-03 11:18 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).