ANDROID: GKI: fix up CRC issue with struct drm_atomic_state

In commit 93f581d763 ("drm/gem: Test for imported GEM buffers with
helper"), a new .h file is included in the drm include files, which
messes with the definition of struct drm_atomic_state by moving some
fields from "unknown" to "known".

Fix this up by adding ANDROID_KABI_DECLONLY directives for every type
affected in every affected source file.

Fixes: 93f581d763 ("drm/gem: Test for imported GEM buffers with helper")
Change-Id: Ia1ecbc152650747bc321156d6920e42121eb34ee
Signed-off-by: Giuliano Procida <gprocida@google.com>
This commit is contained in:
Giuliano Procida
2025-07-01 12:44:36 +01:00
parent 1b3f86d6f7
commit 3aa4e29eea
13 changed files with 59 additions and 0 deletions

View File

@@ -46,6 +46,11 @@
#include "drm_crtc_internal.h"
#include "drm_internal.h"
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
ANDROID_KABI_DECLONLY(iosys_map);
void __drm_crtc_commit_free(struct kref *kref)
{
struct drm_crtc_commit *commit =

View File

@@ -23,6 +23,10 @@
#include "drm_crtc_internal.h"
#include "drm_internal.h"
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
/**
* DOC: overview
*

View File

@@ -45,6 +45,10 @@
#include "drm_crtc_internal.h"
#include "drm_internal.h"
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
/***************************************************
* Initialization, etc.
**************************************************/

View File

@@ -49,6 +49,10 @@
#include "drm_crtc_internal.h"
#include "drm_internal.h"
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
/* from BKL pushdown */
DEFINE_MUTEX(drm_global_mutex);

View File

@@ -38,6 +38,11 @@
#include "drm_crtc_internal.h"
#include "drm_internal.h"
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
ANDROID_KABI_DECLONLY(iosys_map);
/**
* DOC: overview
*

View File

@@ -211,6 +211,11 @@
#include "drm_internal.h"
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
ANDROID_KABI_DECLONLY(iosys_map);
struct syncobj_wait_entry {
struct list_head node;
struct task_struct *task;

View File

@@ -46,6 +46,11 @@
#include "ttm_module.h"
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
ANDROID_KABI_DECLONLY(sg_table);
static void ttm_bo_mem_space_debug(struct ttm_buffer_object *bo,
struct ttm_placement *placement)
{

View File

@@ -37,6 +37,10 @@
#include <drm/drm_cache.h>
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
struct ttm_transfer_obj {
struct ttm_buffer_object base;
struct ttm_buffer_object *bo;

View File

@@ -38,6 +38,11 @@
#include <drm/drm_drv.h>
#include <drm/drm_managed.h>
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
ANDROID_KABI_DECLONLY(sg_table);
static vm_fault_t ttm_bo_vm_fault_idle(struct ttm_buffer_object *bo,
struct vm_fault *vmf)
{

View File

@@ -37,6 +37,11 @@
#include "ttm_module.h"
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
ANDROID_KABI_DECLONLY(sg_table);
/*
* ttm_global_mutex - protecting the global state
*/

View File

@@ -37,6 +37,11 @@
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
ANDROID_KABI_DECLONLY(sg_table);
/*
* Currently we use a spinlock for the lock, but a mutex *may* be
* more appropriate to reduce scheduling latency if the range manager

View File

@@ -33,6 +33,10 @@
#include <drm/drm_util.h>
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
/* Detach the cursor from the bulk move list*/
static void
ttm_resource_cursor_clear_bulk(struct ttm_resource_cursor *cursor)

View File

@@ -45,6 +45,10 @@
#include "ttm_module.h"
#include <linux/android_kabi.h>
ANDROID_KABI_DECLONLY(dma_buf);
ANDROID_KABI_DECLONLY(dma_buf_attachment);
static unsigned long ttm_pages_limit;
MODULE_PARM_DESC(pages_limit, "Limit for the allocated pages");