From: Lizhi Hou <lizhi.hou@amd.com>
To: Jeffrey Hugo <quic_jhugo@quicinc.com>, <quic_carlv@quicinc.com>,
<manivannan.sadhasivam@linaro.org>, <quic_yabdulra@quicinc.com>,
<quic_mattleun@quicinc.com>, <quic_thanson@quicinc.com>
Cc: <ogabbay@kernel.org>, <jacek.lawrynowicz@linux.intel.com>,
<linux-arm-msm@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>, <mhi@lists.linux.dev>
Subject: Re: [PATCH 6/7] accel/qaic: Add config structs for supported cards
Date: Fri, 20 Dec 2024 10:08:36 -0800 [thread overview]
Message-ID: <d0a2059e-7c81-1eb8-6c59-0f72c0688ef5@amd.com> (raw)
In-Reply-To: <c24e081b-7e2a-4bb0-9445-458e21e964f3@quicinc.com>
On 12/20/24 09:15, Jeffrey Hugo wrote:
> On 12/13/2024 5:35 PM, Lizhi Hou wrote:
>>
>> On 12/13/24 13:33, Jeffrey Hugo wrote:
>>> -static struct qaic_device *create_qdev(struct pci_dev *pdev, const
>>> struct pci_device_id *id)
>>> +static struct qaic_device *create_qdev(struct pci_dev *pdev,
>>> + const struct qaic_device_config *config)
>>> {
>>> struct device *dev = &pdev->dev;
>>> struct qaic_drm_device *qddev;
>>> @@ -365,12 +391,10 @@ static struct qaic_device *create_qdev(struct
>>> pci_dev *pdev, const struct pci_de
>>> return NULL;
>>> qdev->dev_state = QAIC_OFFLINE;
>>> - if (id->device == PCI_DEV_AIC080 || id->device ==
>>> PCI_DEV_AIC100) {
>>> - qdev->num_dbc = 16;
>>> - qdev->dbc = devm_kcalloc(dev, qdev->num_dbc,
>>> sizeof(*qdev->dbc), GFP_KERNEL);
>>> - if (!qdev->dbc)
>>> - return NULL;
>>> - }
>>> + qdev->num_dbc = 16;
>>
>> Is it better to put num_dbc in qaic_device_config?
>
> I think there is no clear "right answer". All known devices use 16.
> There may be a future device which has a different value, at which
> point I think this needs to be in qaic_device_config. For this patch,
> I was conservative and only included items in qaic_device_config which
> do vary between the known devices.
>
> I'll think in this a bit more.
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
>
>>
>> Thanks,
>>
>> Lizhi
>>
next prev parent reply other threads:[~2024-12-20 18:08 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 21:33 [PATCH 0/7] accel/qaic: Initial AIC200 support Jeffrey Hugo
2024-12-13 21:33 ` [PATCH 1/7] bus: mhi: host: Refactor BHI/BHIe based firmware loading Jeffrey Hugo
2025-01-07 11:06 ` Jacek Lawrynowicz
2025-01-08 5:24 ` Manivannan Sadhasivam
2025-01-17 16:21 ` Jeffrey Hugo
2024-12-13 21:33 ` [PATCH 2/7] bus: mhi: host: Add a policy to enable image transfer via BHIe in PBL Jeffrey Hugo
2025-01-07 11:12 ` Jacek Lawrynowicz
2025-01-08 5:42 ` Manivannan Sadhasivam
2025-01-17 16:45 ` Jeffrey Hugo
2024-12-13 21:33 ` [PATCH 3/7] accel/qaic: Allocate an exact number of MSIs Jeffrey Hugo
2024-12-13 23:43 ` Lizhi Hou
2024-12-13 21:33 ` [PATCH 4/7] accel/qaic: Add support for MSI-X Jeffrey Hugo
2024-12-13 23:49 ` Lizhi Hou
2024-12-13 21:33 ` [PATCH 5/7] accel/qaic: Mask out SR-IOV PCI resources Jeffrey Hugo
2024-12-14 0:20 ` Lizhi Hou
2024-12-13 21:33 ` [PATCH 6/7] accel/qaic: Add config structs for supported cards Jeffrey Hugo
2024-12-14 0:35 ` Lizhi Hou
2024-12-20 17:15 ` Jeffrey Hugo
2024-12-20 18:08 ` Lizhi Hou [this message]
2024-12-13 21:33 ` [PATCH 7/7] accel/qaic: Add AIC200 support Jeffrey Hugo
2024-12-14 0:49 ` Lizhi Hou
2024-12-20 17:26 ` Jeffrey Hugo
2024-12-20 17:33 ` Lizhi Hou
2024-12-20 17:50 ` Jeffrey Hugo
2024-12-20 18:07 ` Lizhi Hou
2024-12-28 0:19 ` kernel test robot
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=d0a2059e-7c81-1eb8-6c59-0f72c0688ef5@amd.com \
--to=lizhi.hou@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jacek.lawrynowicz@linux.intel.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mhi@lists.linux.dev \
--cc=ogabbay@kernel.org \
--cc=quic_carlv@quicinc.com \
--cc=quic_jhugo@quicinc.com \
--cc=quic_mattleun@quicinc.com \
--cc=quic_thanson@quicinc.com \
--cc=quic_yabdulra@quicinc.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