Skip to content

Commit 18b3846

Browse files
committed
Reduce diff with Linux 6.8
Differences were reviewed using e.g.: diff -Nau -pX scripts/diffignore \ drm-kmod/drivers/gpu/drm/ \ linux/drivers/gpu/drm/ diff -Naur -pX scripts/diffignore \ drm-kmod/drivers/gpu/drm/amd/amdgpu/ \ linux/drivers/gpu/drm/amd/amdgpu/ diff -Naur -pX scripts/diffignore \ drm-kmod/drivers/gpu/drm/i915/ \ linux/drivers/gpu/drm/i915/ diff -Naur -pX scripts/diffignore \ drm-kmod/include/drm/ \ linux/include/drm/
1 parent 7f931be commit 18b3846

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c

+4
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,10 @@ static bool amdgpu_atrm_get_bios(struct amdgpu_device *adev)
291291
acpi_status status;
292292
bool found = false;
293293

294+
/* ATRM is for the discrete card only */
295+
if (adev->flags & AMD_IS_APU)
296+
return false;
297+
294298
/* ATRM is for on-platform devices only */
295299
if (dev_is_removable(&adev->pdev->dev))
296300
return false;

include/drm/drm_eld.h

+12-7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#include <linux/types.h>
1010

11+
struct cea_sad;
12+
1113
/* ELD Header Block */
1214
#define DRM_ELD_HEADER_BLOCK_SIZE 4
1315

@@ -70,16 +72,19 @@
7072
* drm_eld_mnl - Get ELD monitor name length in bytes.
7173
* @eld: pointer to an eld memory structure with mnl set
7274
*/
73-
static inline int drm_eld_mnl(const uint8_t *eld)
75+
static inline int drm_eld_mnl(const u8 *eld)
7476
{
7577
return (eld[DRM_ELD_CEA_EDID_VER_MNL] & DRM_ELD_MNL_MASK) >> DRM_ELD_MNL_SHIFT;
7678
}
7779

80+
int drm_eld_sad_get(const u8 *eld, int sad_index, struct cea_sad *cta_sad);
81+
int drm_eld_sad_set(u8 *eld, int sad_index, const struct cea_sad *cta_sad);
82+
7883
/**
7984
* drm_eld_sad - Get ELD SAD structures.
8085
* @eld: pointer to an eld memory structure with sad_count set
8186
*/
82-
static inline const uint8_t *drm_eld_sad(const uint8_t *eld)
87+
static inline const u8 *drm_eld_sad(const u8 *eld)
8388
{
8489
unsigned int ver, mnl;
8590

@@ -98,7 +103,7 @@ static inline const uint8_t *drm_eld_sad(const uint8_t *eld)
98103
* drm_eld_sad_count - Get ELD SAD count.
99104
* @eld: pointer to an eld memory structure with sad_count set
100105
*/
101-
static inline int drm_eld_sad_count(const uint8_t *eld)
106+
static inline int drm_eld_sad_count(const u8 *eld)
102107
{
103108
return (eld[DRM_ELD_SAD_COUNT_CONN_TYPE] & DRM_ELD_SAD_COUNT_MASK) >>
104109
DRM_ELD_SAD_COUNT_SHIFT;
@@ -111,7 +116,7 @@ static inline int drm_eld_sad_count(const uint8_t *eld)
111116
* This is a helper for determining the payload size of the baseline block, in
112117
* bytes, for e.g. setting the Baseline_ELD_Len field in the ELD header block.
113118
*/
114-
static inline int drm_eld_calc_baseline_block_size(const uint8_t *eld)
119+
static inline int drm_eld_calc_baseline_block_size(const u8 *eld)
115120
{
116121
return DRM_ELD_MONITOR_NAME_STRING - DRM_ELD_HEADER_BLOCK_SIZE +
117122
drm_eld_mnl(eld) + drm_eld_sad_count(eld) * 3;
@@ -127,7 +132,7 @@ static inline int drm_eld_calc_baseline_block_size(const uint8_t *eld)
127132
*
128133
* The returned value is guaranteed to be a multiple of 4.
129134
*/
130-
static inline int drm_eld_size(const uint8_t *eld)
135+
static inline int drm_eld_size(const u8 *eld)
131136
{
132137
return DRM_ELD_HEADER_BLOCK_SIZE + eld[DRM_ELD_BASELINE_ELD_LEN] * 4;
133138
}
@@ -139,7 +144,7 @@ static inline int drm_eld_size(const uint8_t *eld)
139144
* The returned value is the speakers mask. User has to use %DRM_ELD_SPEAKER
140145
* field definitions to identify speakers.
141146
*/
142-
static inline u8 drm_eld_get_spk_alloc(const uint8_t *eld)
147+
static inline u8 drm_eld_get_spk_alloc(const u8 *eld)
143148
{
144149
return eld[DRM_ELD_SPEAKER] & DRM_ELD_SPEAKER_MASK;
145150
}
@@ -151,7 +156,7 @@ static inline u8 drm_eld_get_spk_alloc(const uint8_t *eld)
151156
* The caller need to use %DRM_ELD_CONN_TYPE_HDMI or %DRM_ELD_CONN_TYPE_DP to
152157
* identify the display type connected.
153158
*/
154-
static inline u8 drm_eld_get_conn_type(const uint8_t *eld)
159+
static inline u8 drm_eld_get_conn_type(const u8 *eld)
155160
{
156161
return eld[DRM_ELD_SAD_COUNT_CONN_TYPE] & DRM_ELD_CONN_TYPE_MASK;
157162
}

include/drm/drm_format_helper.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* SPDX-License-Identifier: GPL-2.0-or-later or MIT */
1+
/* SPDX-License-Identifier: GPL-2.0-or-later */
22
/*
33
* Copyright (C) 2016 Noralf Trønnes
44
*/

include/drm/drm_modes.h

+1
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ void drm_display_mode_from_videomode(const struct videomode *vm,
503503
void drm_display_mode_to_videomode(const struct drm_display_mode *dmode,
504504
struct videomode *vm);
505505
void drm_bus_flags_from_videomode(const struct videomode *vm, u32 *bus_flags);
506+
506507
#ifdef __linux__
507508
#if defined(CONFIG_OF)
508509
int of_get_drm_display_mode(struct device_node *np,

0 commit comments

Comments
 (0)