From: Sinan Kaya <okaya@codeaurora.org>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: linux-pci@vger.kernel.org, timur@codeaurora.org,
David Airlie <airlied@linux.ie>,
linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org,
open list <linux-kernel@vger.kernel.org>,
"open list:DRM DRIVERS" <dri-devel@lists.freedesktop.org>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [Intel-gfx] [PATCH V3 09/29] drm/i915: deprecate pci_get_bus_and_slot()
Date: Sun, 3 Dec 2017 14:29:03 -0500 [thread overview]
Message-ID: <ad60832e-a0bd-007f-293f-dc5ad3e629d5@codeaurora.org> (raw)
In-Reply-To: <9046d23e-412d-9d9f-147f-a3bc6eea34fc@codeaurora.org>
On 11/28/2017 11:29 AM, Sinan Kaya wrote:
> On 11/28/2017 10:30 AM, Ville Syrjälä wrote:
>>> + dev_priv->bridge_dev =
>>> + pci_get_domain_bus_and_slot(domain, 0, PCI_DEVFN(0, 0));
>> Maybe just pci_get_slot(pdev->bus, PCI_DEVFN(0, 0)) ?
>>
>> I guess if we want to be pedantic we could go for:
>>
>> bus = pci_find_host_bridge(pdev->bus)->bus;
>> pci_get_slot(bus, PCI_DEVFN(0, 0))
>>
>> but I think the GPU should always be on the root bus, so the simpler
>> form should be fine.
>>
>
> All three of these should be correct.
>
> I'll use pci_get_slot(pdev->bus, PCI_DEVFN(0, 0)) as you suggested.
>
Now that I think about this more, I think my version is a simpler change
and does not introduce "new features" by assuming GPU and host to be
on the same bus similar to the original code.
Original code could have used pci_get_slot() too. Since all of them are
correct, mine is slightly more correct; I'd like to keep mine.
--
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.
next prev parent reply other threads:[~2017-12-03 19:29 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1511801886-6753-1-git-send-email-okaya@codeaurora.org>
2017-11-27 16:57 ` [PATCH V3 01/29] alpha/PCI: deprecate pci_get_bus_and_slot() Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 02/29] powerpc/PCI: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 03/29] x86/PCI: " Sinan Kaya
2017-11-28 13:45 ` Thomas Gleixner
2017-11-27 16:57 ` [PATCH V3 04/29] ata: " Sinan Kaya
2017-11-27 19:50 ` Tejun Heo
2017-11-27 16:57 ` [PATCH V3 05/29] agp: nvidia: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 06/29] edd: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 07/29] ibft: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 08/29] drm/gma500: " Sinan Kaya
2017-11-27 18:49 ` Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 09/29] drm/i915: " Sinan Kaya
2017-11-27 18:50 ` Sinan Kaya
2017-12-12 14:04 ` Joonas Lahtinen
2017-12-13 0:07 ` Sinan Kaya
2017-12-13 8:01 ` Joonas Lahtinen
2017-11-28 15:30 ` [Intel-gfx] " Ville Syrjälä
2017-11-28 16:29 ` Sinan Kaya
2017-12-03 19:29 ` Sinan Kaya [this message]
2018-02-16 14:54 ` Bjorn Helgaas
2018-02-19 9:34 ` Jani Nikula
2018-02-19 9:47 ` Joonas Lahtinen
2017-11-27 16:57 ` [PATCH V3 10/29] drm/nouveau: " Sinan Kaya
2017-11-27 18:52 ` Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 11/29] Drivers: ide: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 12/29] iommu/amd: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 13/29] powerpc/powermac: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 14/29] bnx2x: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 15/29] pch_gbe: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 16/29] PCI: cpqhp: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 17/29] PCI: ibmphp: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 18/29] PCI/quirks: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 19/29] PCI/syscall: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 20/29] xen: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 21/29] openprom: " Sinan Kaya
2017-11-27 16:57 ` [PATCH V3 22/29] [media] atomisp: " Sinan Kaya
2017-11-29 8:36 ` Sakari Ailus
2017-11-27 16:58 ` [PATCH V3 23/29] staging: rts5208: remove rtsx_read_pci_cfg_byte() Sinan Kaya
2017-11-27 16:58 ` [PATCH V3 24/29] backlight: deprecate pci_get_bus_and_slot() Sinan Kaya
2017-11-27 19:46 ` Jingoo Han
2017-11-28 8:13 ` Lee Jones
2017-11-27 16:58 ` [PATCH V3 25/29] video: fbdev: intelfb: " Sinan Kaya
2017-11-27 16:58 ` [PATCH V3 26/29] video: fbdev: nvidia: " Sinan Kaya
2017-11-27 16:58 ` [PATCH V3 27/29] video: fbdev: riva: " Sinan Kaya
2017-11-27 16:58 ` [PATCH V3 28/29] i7300_idle: remove unused file Sinan Kaya
2017-11-27 16:58 ` [PATCH V3 29/29] PCI: remove pci_get_bus_and_slot() function Sinan Kaya
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=ad60832e-a0bd-007f-293f-dc5ad3e629d5@codeaurora.org \
--to=okaya@codeaurora.org \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=timur@codeaurora.org \
--cc=ville.syrjala@linux.intel.com \
/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;
as well as URLs for NNTP newsgroup(s).