Compile problem due to patch from raspberry pi

Open
#4,919 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, linux, raspberry-pi

Research direction

Start by reproducing the arm64 cross-compilation failure with the Raspberry Pi patches applied. Inspect drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h and drivers/gpu/drm/msm/dp/dp_display.c, particularly their drm_panel.h and drm_connector.h includes. Done means the Debian kernel builds successfully with the affected patches, using either the proposed includes or an agreed header-definition change.

Written by the indexing model from the issue text.

Description

Describe the bug

I am compiling a Debian kernel with all patches from raspberry pi applied.

This breaks since a few kernel revisions due to the following patch:
From 1a5ac44f2640e1e5f184dea59456644a8fe6854e Mon Sep 17 00:00:00 2001
From: Dave Stevenson dave.stevenson@raspberrypi.com
Date: Tue, 1 Feb 2022 12:20:20 +0000
Subject: [PATCH 599/667] drm/panel: Add and initialise an orientation field to drm_panel

The following quick fix seems to cure the compile problems for me:

--- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h
+++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h
@@ -7,6 +7,7 @@
 #ifndef __MDP4_KMS_H__
 #define __MDP4_KMS_H__
 
+#include <drm/drm_connector.h>
 #include <drm/drm_panel.h>
 
 #include "msm_drv.h"
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -10,6 +10,7 @@
 #include <linux/component.h>
 #include <linux/of_irq.h>
 #include <linux/delay.h>
+#include <drm/drm_connector.h>
 #include <drm/drm_panel.h>
 
 #include "msm_drv.h"

Can you please review this and include this in your rpi patches for kernel 5.16 and 5.17?
Instead of these includes, maybe you want to move the definition of "enum drm_panel_orientation"
from drom_connector.h to drm_panel.h instead?

Thanks a lot,
best regards from Germany,

Florian La Roche

Steps to reproduce the behaviour

Cross-recompile Debian kernel together with raspberry pi patches applied.

Device (s)

Other

System

arm64 build, crosscompile from amd64

Logs

No response

Additional context

No response

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.