[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <93778bd1-36ed-4db0-9d41-a029577d76c6@habana.ai>
Date: Sun, 25 Feb 2024 10:36:38 +0000
From: Ohad Sharabi <osharabi@...ana.ai>
To: Carl Vanderlip <quic_carlv@...cinc.com>, Oded Gabbay <ogabbay@...nel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 01/13] accel/habanalabs/gaudi2: use single function to
compare FW versions
On 24/02/2024 0:38, Carl Vanderlip wrote:
> [You don't often get email from quic_carlv@...cinc.com. Learn why this
> is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> On 2/20/2024 8:01 AM, Oded Gabbay wrote:> From: Ohad Sharabi
> <osharabi@...ana.ai>
> >
> > Currently, the code contains 2 types of FW version comparison
> functions:
> > - hl_is_fw_sw_ver_[below/equal_or_greater]()
> > - gaudi2 specific function of the type
> > gaudi2_is_fw_ver_[below/above]x_y_z()
> >
> > Moreover, some functions use the inner FW version which should be only
> > stage during development but not version dependencies.
> >
> > Finally, some tests are done to deprecated FW version to which LKD
> > should hold no compatibility.
> >
> > This commit aligns all APIs to a single function that just compares the
> > version and return an integers indicator (similar in some way to
> > strcmp()).
> >
> > In addition, this generic function now considers also the sub-minor FW
> > version and also remove dead code resulting in deprecated FW versions
> > compatibility.
> >
> > Signed-off-by: Ohad Sharabi <osharabi@...ana.ai>
> > Reviewed-by: Oded Gabbay <ogabbay@...nel.org>
> > Signed-off-by: Oded Gabbay <ogabbay@...nel.org>
> > ---
> > drivers/accel/habanalabs/common/firmware_if.c | 25 ++++++++
> > drivers/accel/habanalabs/common/habanalabs.h | 20 +------
> > drivers/accel/habanalabs/gaudi2/gaudi2.c | 57
> +++----------------
> > 3 files changed, 34 insertions(+), 68 deletions(-)
> >
> ...
> > diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c
> b/drivers/accel/habanalabs/gaudi2/gaudi2.c
> > index 1f061209ae21..4a0917aa4dd7 100644
> > --- a/drivers/accel/habanalabs/gaudi2/gaudi2.c
> > +++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c
> > @@ -2601,6 +2601,8 @@ static int gaudi2_set_fixed_properties(struct
> hl_device *hdev)
> >
> > prop->hbw_flush_reg = mmPCIE_WRAP_SPECIAL_GLBL_SPARE_0;
> >
> > + prop->supports_advanced_cpucp_rc = true;
> > +
> > return 0;
> >
> > free_qprops:
> > @@ -3308,8 +3310,6 @@ static int gaudi2_late_init(struct hl_device
> *hdev)
> > struct gaudi2_device *gaudi2 = hdev->asic_specific;
> > int rc;
> >
> > - hdev->asic_prop.supports_advanced_cpucp_rc = true;
> > -
> > rc = hl_fw_send_pci_access_msg(hdev,
> CPUCP_PACKET_ENABLE_PCI_ACCESS,
> > gaudi2->virt_msix_db_dma_addr);
> > if (rc) {
Carl,
Sure, we'll split the patches
Ohad
>
> Is this change in support of the others in this patch? Feels like this
> should be more than one patch (adding new version_cmp, removing old
> checks).
>
> -Carl V.
Powered by blists - more mailing lists