* [PATCH v3 68/74] x86/cpu/vfm: Update drivers/staging/media/atomisp/include/linux/atomisp_platform.h
[not found] <20240416211941.9369-1-tony.luck@intel.com>
@ 2024-04-16 21:22 ` Tony Luck
2024-04-17 8:07 ` Andy Shevchenko
0 siblings, 1 reply; 5+ messages in thread
From: Tony Luck @ 2024-04-16 21:22 UTC (permalink / raw)
To: Hans de Goede, Mauro Carvalho Chehab
Cc: Sakari Ailus, Greg Kroah-Hartman, Tony Luck, Andy Shevchenko,
linux-media, linux-staging, linux-kernel, patches
New CPU #defines encode vendor and family as well as model.
Signed-off-by: Tony Luck <tony.luck@intel.com>
---
.../atomisp/include/linux/atomisp_platform.h | 26 ++++++++-----------
1 file changed, 11 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/media/atomisp/include/linux/atomisp_platform.h b/drivers/staging/media/atomisp/include/linux/atomisp_platform.h
index 487ef5846c24..59f71659b2d8 100644
--- a/drivers/staging/media/atomisp/include/linux/atomisp_platform.h
+++ b/drivers/staging/media/atomisp/include/linux/atomisp_platform.h
@@ -18,6 +18,7 @@
#ifndef ATOMISP_PLATFORM_H_
#define ATOMISP_PLATFORM_H_
+#include <asm/cpu_device_id.h>
#include <asm/intel-family.h>
#include <asm/processor.h>
@@ -217,22 +218,17 @@ void atomisp_unregister_subdev(struct v4l2_subdev *subdev);
int v4l2_get_acpi_sensor_info(struct device *dev, char **module_id_str);
/* API from old platform_camera.h, new CPUID implementation */
-#define __IS_SOC(x) (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && \
- boot_cpu_data.x86 == 6 && \
- boot_cpu_data.x86_model == (x))
-#define __IS_SOCS(x,y) (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL && \
- boot_cpu_data.x86 == 6 && \
- (boot_cpu_data.x86_model == (x) || \
- boot_cpu_data.x86_model == (y)))
-
-#define IS_MFLD __IS_SOC(INTEL_FAM6_ATOM_SALTWELL_MID)
-#define IS_BYT __IS_SOC(INTEL_FAM6_ATOM_SILVERMONT)
-#define IS_CHT __IS_SOC(INTEL_FAM6_ATOM_AIRMONT)
-#define IS_MRFD __IS_SOC(INTEL_FAM6_ATOM_SILVERMONT_MID)
-#define IS_MOFD __IS_SOC(INTEL_FAM6_ATOM_AIRMONT_MID)
+#define __IS_SOC(x) (boot_cpu_data.x86_vfm == x)
+#define __IS_SOCS(x, y) (boot_cpu_data.x86_vfm == x || boot_cpu_data.x86_vfm == y)
+
+#define IS_MFLD __IS_SOC(INTEL_ATOM_SALTWELL_MID)
+#define IS_BYT __IS_SOC(INTEL_ATOM_SILVERMONT)
+#define IS_CHT __IS_SOC(INTEL_ATOM_AIRMONT)
+#define IS_MRFD __IS_SOC(INTEL_ATOM_SILVERMONT_MID)
+#define IS_MOFD __IS_SOC(INTEL_ATOM_AIRMONT_MID)
/* Both CHT and MOFD come with ISP2401 */
-#define IS_ISP2401 __IS_SOCS(INTEL_FAM6_ATOM_AIRMONT, \
- INTEL_FAM6_ATOM_AIRMONT_MID)
+#define IS_ISP2401 __IS_SOCS(INTEL_ATOM_AIRMONT, \
+ INTEL_ATOM_AIRMONT_MID)
#endif /* ATOMISP_PLATFORM_H_ */
--
2.44.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 68/74] x86/cpu/vfm: Update drivers/staging/media/atomisp/include/linux/atomisp_platform.h
2024-04-16 21:22 ` [PATCH v3 68/74] x86/cpu/vfm: Update drivers/staging/media/atomisp/include/linux/atomisp_platform.h Tony Luck
@ 2024-04-17 8:07 ` Andy Shevchenko
2024-04-17 16:24 ` Luck, Tony
0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2024-04-17 8:07 UTC (permalink / raw)
To: Tony Luck
Cc: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
Greg Kroah-Hartman, linux-media, linux-staging, linux-kernel,
patches
On Wed, Apr 17, 2024 at 12:22 AM Tony Luck <tony.luck@intel.com> wrote:
>
> New CPU #defines encode vendor and family as well as model.
Thanks, but I would rather see this using the following
https://elixir.bootlin.com/linux/v6.9-rc4/source/include/linux/platform_data/x86/soc.h
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v3 68/74] x86/cpu/vfm: Update drivers/staging/media/atomisp/include/linux/atomisp_platform.h
2024-04-17 8:07 ` Andy Shevchenko
@ 2024-04-17 16:24 ` Luck, Tony
2024-04-17 17:00 ` Andy Shevchenko
0 siblings, 1 reply; 5+ messages in thread
From: Luck, Tony @ 2024-04-17 16:24 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
Greg Kroah-Hartman, linux-media, linux-staging, linux-kernel,
patches
>> New CPU #defines encode vendor and family as well as model.
>
> Thanks, but I would rather see this using the following
> https://elixir.bootlin.com/linux/v6.9-rc4/source/include/linux/platform_data/x86/soc.h
Are you asking for drivers/staging/media/atomisp/include/linux/atomisp_platform.h
to be refactored to use the new functions/macros in <linux/platform_data/x86/soc.h>?
Maybe folks working on this staging driver can do that? I don't think I have the domain
specific knowledge to make this update.
Note that patch 69 in this series does update <linux/platform_data/x86/soc.h> to use
the new vendor-family-model scheme.
-Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3 68/74] x86/cpu/vfm: Update drivers/staging/media/atomisp/include/linux/atomisp_platform.h
2024-04-17 16:24 ` Luck, Tony
@ 2024-04-17 17:00 ` Andy Shevchenko
2024-04-17 17:31 ` Luck, Tony
0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2024-04-17 17:00 UTC (permalink / raw)
To: Luck, Tony
Cc: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
Greg Kroah-Hartman, linux-media, linux-staging, linux-kernel,
patches
On Wed, Apr 17, 2024 at 7:24 PM Luck, Tony <tony.luck@intel.com> wrote:
>
> >> New CPU #defines encode vendor and family as well as model.
> >
> > Thanks, but I would rather see this using the following
> > https://elixir.bootlin.com/linux/v6.9-rc4/source/include/linux/platform_data/x86/soc.h
>
> Are you asking for drivers/staging/media/atomisp/include/linux/atomisp_platform.h
> to be refactored to use the new functions/macros in <linux/platform_data/x86/soc.h>?
>
> Maybe folks working on this staging driver can do that? I don't think I have the domain
> specific knowledge to make this update.
>
> Note that patch 69 in this series does update <linux/platform_data/x86/soc.h> to use
> the new vendor-family-model scheme.
So. maybe if this patch is placed after that one, it can be easily
seen how to amend it? I would help with the conversion as I know
something about AtomISP driver code (not as much as Hans de Goede,
though).
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v3 68/74] x86/cpu/vfm: Update drivers/staging/media/atomisp/include/linux/atomisp_platform.h
2024-04-17 17:00 ` Andy Shevchenko
@ 2024-04-17 17:31 ` Luck, Tony
0 siblings, 0 replies; 5+ messages in thread
From: Luck, Tony @ 2024-04-17 17:31 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Hans de Goede, Mauro Carvalho Chehab, Sakari Ailus,
Greg Kroah-Hartman, linux-media, linux-staging, linux-kernel,
patches
>> Note that patch 69 in this series does update <linux/platform_data/x86/soc.h> to use
>> the new vendor-family-model scheme.
>
> So. maybe if this patch is placed after that one, it can be easily
> seen how to amend it? I would help with the conversion as I know
> something about AtomISP driver code (not as much as Hans de Goede,
> though).
Ok. I put a hold on patch 68 until 69 is applied somewhere (that one
has a Ack from Rafael, so is high on the list to move forward once
parts 1-3 are applied.)
-Tony
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-04-17 17:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20240416211941.9369-1-tony.luck@intel.com>
2024-04-16 21:22 ` [PATCH v3 68/74] x86/cpu/vfm: Update drivers/staging/media/atomisp/include/linux/atomisp_platform.h Tony Luck
2024-04-17 8:07 ` Andy Shevchenko
2024-04-17 16:24 ` Luck, Tony
2024-04-17 17:00 ` Andy Shevchenko
2024-04-17 17:31 ` Luck, Tony
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).