Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions module/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ ifneq (,$(findstring rhel,$(ID_LIKE)))
ELFLAG := -DEL$(shell echo $(VERSION_ID) | cut -d. -f1)
endif

ifneq (,$(findstring centos,$(ID)))
CENTOSFLAG := -DCENTOS$(VERSION_ID)
endif

Raspbian := $(shell grep -Eic 'raspb(erry|ian)' /proc/cpuinfo /etc/os-release 2>/dev/null )
ifeq (,$(findstring 0, $(Raspbian)))
RPIFLAG := -DRPI
Expand All @@ -23,7 +27,7 @@ ifneq ($(DKMS_BUILD),)

KERN_DIR := /lib/modules/$(KERNELRELEASE)/build

ccflags-y := -Iinclude/uapi/drm -Iinclude/drm $(ELFLAG) $(RPIFLAG)
ccflags-y := -Iinclude/uapi/drm -Iinclude/drm $(ELFLAG) $(CENTOSFLAG) $(RPIFLAG)
evdi-y := evdi_platform_drv.o evdi_platform_dev.o evdi_sysfs.o evdi_modeset.o evdi_connector.o evdi_encoder.o evdi_drm_drv.o evdi_fb.o evdi_gem.o evdi_painter.o evdi_params.o evdi_cursor.o evdi_debug.o evdi_i2c.o
evdi-$(CONFIG_COMPAT) += evdi_ioc32.o
obj-m := evdi.o
Expand All @@ -45,7 +49,7 @@ ifneq ($(KERNELRELEASE),)

# inside kbuild
# Note: this can be removed once it is in kernel tree and Kconfig is properly used
ccflags-y := -isystem include/uapi/drm $(CFLAGS) $(ELFLAG) $(RPIFLAG)
ccflags-y := -isystem include/uapi/drm $(CFLAGS) $(ELFLAG) $(CENTOSFLAG) $(RPIFLAG)
evdi-y := evdi_platform_drv.o evdi_platform_dev.o evdi_sysfs.o evdi_modeset.o evdi_connector.o evdi_encoder.o evdi_drm_drv.o evdi_fb.o evdi_gem.o evdi_painter.o evdi_params.o evdi_cursor.o evdi_debug.o evdi_i2c.o
evdi-$(CONFIG_COMPAT) += evdi_ioc32.o
CONFIG_DRM_EVDI ?= m
Expand Down
2 changes: 1 addition & 1 deletion module/evdi_drm_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ long evdi_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
struct drm_framebuffer *evdi_fb_user_fb_create(
struct drm_device *dev,
struct drm_file *file,
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE || defined(CENTOS9) || defined(CENTOS10)
const struct drm_format_info *info,
#endif
const struct drm_mode_fb_cmd2 *mode_cmd);
Expand Down
10 changes: 5 additions & 5 deletions module/evdi_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,20 +203,20 @@ static const struct drm_framebuffer_funcs evdifb_funcs = {
static int
evdi_framebuffer_init(struct drm_device *dev,
struct evdi_framebuffer *efb,
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE || defined(CENTOS9) || defined(CENTOS10)
const struct drm_format_info *info,
#endif
const struct drm_mode_fb_cmd2 *mode_cmd,
struct evdi_gem_object *obj)
{
efb->obj = obj;
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE || defined(CENTOS9) || defined(CENTOS10)
if (info == NULL)
info = drm_get_format_info(dev, mode_cmd->pixel_format,
mode_cmd->modifier[0]);
#endif
drm_helper_mode_fill_fb_struct(dev, &efb->base,
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE || defined(CENTOS9) || defined(CENTOS10)
info,
#endif
mode_cmd);
Expand Down Expand Up @@ -253,7 +253,7 @@ static bool is_xe_gem(struct dma_buf *dmabuf)
struct drm_framebuffer *evdi_fb_user_fb_create(
struct drm_device *dev,
struct drm_file *file,
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE || defined(CENTOS9) || defined(CENTOS10)
const struct drm_format_info *info,
#endif
const struct drm_mode_fb_cmd2 *mode_cmd)
Expand Down Expand Up @@ -289,7 +289,7 @@ struct drm_framebuffer *evdi_fb_user_fb_create(
efb->base.obj[0] = obj;

ret = evdi_framebuffer_init(dev, efb,
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE
#if KERNEL_VERSION(6, 17, 0) <= LINUX_VERSION_CODE || defined(CENTOS9) || defined(CENTOS10)
info,
#endif
mode_cmd, to_evdi_bo(obj));
Expand Down