video: firmware: Add multi-kernel PAS API compatibility#99
video: firmware: Add multi-kernel PAS API compatibility#99venvenk wants to merge 1 commit intoqualcomm-linux:video.qclinux.mainfrom
Conversation
|
@lumag Requesting your review.
All code changes are ready and validated, will be included in iris-video-dlkm_1.0.8.bb. |
|
No, that's a very bad idea. Check for the features/API rather than particular versions. |
| const char *fw_name, | ||
| phys_addr_t phys, size_t res_size) | ||
| { | ||
| #if defined(HAS_YOCTO_6_18) |
There was a problem hiding this comment.
No spaghetti code in the functions. If you need, put the whole function in the if block.
@lumag in Yocto build there is no direct provision to scan code of one recipe from another. Current Approach : python () {
kernel_provider = d.getVar('PREFERRED_PROVIDER_virtual/kernel') or ''
if 'linux-yocto' in kernel_provider:
if 'dev' in kernel_provider:
cflags_value = '-DHAS_YOCTO_DEV'
else:
cflags_value = '-DHAS_YOCTO_6_18'
d.appendVar('EXTRA_OEMAKE', f' KCFLAGS="{cflags_value}"')
}@lumag could you please elaborate on this approach if there is any other way to check for features/API instead? |
Yes. Use the C preprocessing and source-level checks. If that's not enough, check from the Makefile. For example, see how it's done in the Nvidia graphics driver. |
|
Basically, you are trying to adapt the code to the patched Yocto 6.18 kernel. This is wrong. It will mean nothing if one tries building against a Debian, Fedora or patched mainline. Instead you must be checking for the source code features. Use kernel version checks, Kconfig symbols, presence of the defines in the include files, etc. |
The iris video driver currently supports only the Qualcomm kernel PAS context API. This patch extends firmware loading to support multiple kernel variants. The appropriate code path is selected at compile time via macros set by the build system. Signed-off-by: Gourav Kumar <gouravk@qti.qualcomm.com>
a76cfa4 to
b59fecb
Compare
|
@lumag Source-level checks have been implemented. Requesting your review. |

The iris video driver currently supports only the Qualcomm kernel PAS context API. This patch extends firmware loading to support multiple kernel variants.
The appropriate code path is selected at compile time via preprocessor macros set by the build system.