Skip to content

Commit 098ca76

Browse files
committed
Merge tag 'drm-misc-next-fixes-2024-03-07' of https://anongit.freedesktop.org/git/drm/drm-misc into drm-next
Short summary of fixes pull: - i915: Fix applying placement flags - fbdev: Fix build on PowerMacs after header cleanup Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20240307124640.GA18593@localhost.localdomain
2 parents af165fb + 838f865 commit 098ca76

File tree

5 files changed

+5
-30
lines changed

5 files changed

+5
-30
lines changed

arch/powerpc/include/asm/backlight.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@
1010
#define __ASM_POWERPC_BACKLIGHT_H
1111
#ifdef __KERNEL__
1212

13-
#include <linux/fb.h>
1413
#include <linux/mutex.h>
1514

15+
struct backlight_device;
16+
1617
/* For locking instructions, see the implementation file */
1718
extern struct backlight_device *pmac_backlight;
1819
extern struct mutex pmac_backlight_mutex;
1920

20-
extern int pmac_backlight_curve_lookup(struct fb_info *info, int value);
21-
2221
extern int pmac_has_backlight_type(const char *type);
2322

2423
extern void pmac_backlight_key(int direction);

arch/powerpc/platforms/powermac/backlight.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*/
1010

1111
#include <linux/kernel.h>
12-
#include <linux/fb.h>
1312
#include <linux/backlight.h>
1413
#include <linux/adb.h>
1514
#include <linux/pmu.h>
@@ -72,31 +71,6 @@ int pmac_has_backlight_type(const char *type)
7271
return 0;
7372
}
7473

75-
int pmac_backlight_curve_lookup(struct fb_info *info, int value)
76-
{
77-
int level = (FB_BACKLIGHT_LEVELS - 1);
78-
79-
if (info && info->bl_dev) {
80-
int i, max = 0;
81-
82-
/* Look for biggest value */
83-
for (i = 0; i < FB_BACKLIGHT_LEVELS; i++)
84-
max = max((int)info->bl_curve[i], max);
85-
86-
/* Look for nearest value */
87-
for (i = 0; i < FB_BACKLIGHT_LEVELS; i++) {
88-
int diff = abs(info->bl_curve[i] - value);
89-
if (diff < max) {
90-
max = diff;
91-
level = i;
92-
}
93-
}
94-
95-
}
96-
97-
return level;
98-
}
99-
10074
static void pmac_backlight_key_worker(struct work_struct *work)
10175
{
10276
if (atomic_read(&kernel_backlight_disabled))

drivers/gpu/drm/i915/gem/i915_gem_ttm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ i915_ttm_placement_from_obj(const struct drm_i915_gem_object *obj,
162162
unsigned int flags = obj->flags;
163163
unsigned int i;
164164

165-
places[0].flags |= TTM_PL_FLAG_DESIRED;
166165
i915_ttm_place_from_region(num_allowed ? obj->mm.placements[0] :
167166
obj->mm.region, &places[0], obj->bo_offset,
168167
obj->base.size, flags);
168+
places[0].flags |= TTM_PL_FLAG_DESIRED;
169169

170170
/* Cache this on object? */
171171
for (i = 0; i < num_allowed; ++i) {

drivers/macintosh/via-pmu-backlight.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <asm/ptrace.h>
1212
#include <linux/adb.h>
13+
#include <linux/backlight.h>
1314
#include <linux/pmu.h>
1415
#include <asm/backlight.h>
1516

drivers/video/fbdev/chipsfb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#include <linux/aperture.h>
18+
#include <linux/backlight.h>
1819
#include <linux/module.h>
1920
#include <linux/kernel.h>
2021
#include <linux/errno.h>

0 commit comments

Comments
 (0)