Short summary of fixes pull:
atomic-helpers: - Fix memory leak in drm_format_conv_state_copy() fbdev: - fbdefio: Fix address calculation gma500: - Fix crash during boot -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmYqLwwACgkQaA3BHVML eiOFAgf+OKUK3CJmWnxHrJjID6j1huZmowRJ5oriSgkb8wQjYxVKviDfG+YUvR5F Tpiv78x/nY/mwCrBMz9cagC/tu7vR2G3lPoA7yLZt+ZbZ2Sa99aqjeY5mTaYX4AZ 1cYlemZGJ5LR8eNG9nX+6FvWNqi+5MrKMrENyr2eexFVqglE2rzZYvFK4Y60A+Dk ks0pt2LtLYZRsQP1xayviLJfX1VWFj/RiQvHloSUs40Xj+zxt6xKgUZ39n6ctS5X RQ3qiJjlHCOOG+Gd71BkiJI00b0ZcHezhHk8uDX5onlZyyJOpHS5yiW3ONDK0T62 LA48Hfssj1M/OLQo8sHldRgdShzD3Q== =icd0 -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2024-04-25' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Short summary of fixes pull: atomic-helpers: - Fix memory leak in drm_format_conv_state_copy() fbdev: - fbdefio: Fix address calculation gma500: - Fix crash during boot Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20240425102413.GA6301@localhost.localdomain
This commit is contained in:
commit
86ab998521
@ -224,8 +224,8 @@ __drm_gem_duplicate_shadow_plane_state(struct drm_plane *plane,
|
||||
|
||||
__drm_atomic_helper_plane_duplicate_state(plane, &new_shadow_plane_state->base);
|
||||
|
||||
drm_format_conv_state_copy(&shadow_plane_state->fmtcnv_state,
|
||||
&new_shadow_plane_state->fmtcnv_state);
|
||||
drm_format_conv_state_copy(&new_shadow_plane_state->fmtcnv_state,
|
||||
&shadow_plane_state->fmtcnv_state);
|
||||
}
|
||||
EXPORT_SYMBOL(__drm_gem_duplicate_shadow_plane_state);
|
||||
|
||||
|
@ -34,7 +34,6 @@ gma500_gfx-y += \
|
||||
psb_intel_lvds.o \
|
||||
psb_intel_modes.o \
|
||||
psb_intel_sdvo.o \
|
||||
psb_lid.o \
|
||||
psb_irq.o
|
||||
|
||||
gma500_gfx-$(CONFIG_ACPI) += opregion.o
|
||||
|
@ -73,8 +73,7 @@ static int psb_backlight_setup(struct drm_device *dev)
|
||||
}
|
||||
|
||||
psb_intel_lvds_set_brightness(dev, PSB_MAX_BRIGHTNESS);
|
||||
/* This must occur after the backlight is properly initialised */
|
||||
psb_lid_timer_init(dev_priv);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -259,8 +258,6 @@ static int psb_chip_setup(struct drm_device *dev)
|
||||
|
||||
static void psb_chip_teardown(struct drm_device *dev)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
|
||||
psb_lid_timer_takedown(dev_priv);
|
||||
gma_intel_teardown_gmbus(dev);
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,6 @@
|
||||
#define PSB_NUM_VBLANKS 2
|
||||
|
||||
#define PSB_WATCHDOG_DELAY (HZ * 2)
|
||||
#define PSB_LID_DELAY (HZ / 10)
|
||||
|
||||
#define PSB_MAX_BRIGHTNESS 100
|
||||
|
||||
@ -491,11 +490,7 @@ struct drm_psb_private {
|
||||
/* Hotplug handling */
|
||||
struct work_struct hotplug_work;
|
||||
|
||||
/* LID-Switch */
|
||||
spinlock_t lid_lock;
|
||||
struct timer_list lid_timer;
|
||||
struct psb_intel_opregion opregion;
|
||||
u32 lid_last_state;
|
||||
|
||||
/* Watchdog */
|
||||
uint32_t apm_reg;
|
||||
@ -591,10 +586,6 @@ struct psb_ops {
|
||||
int i2c_bus; /* I2C bus identifier for Moorestown */
|
||||
};
|
||||
|
||||
/* psb_lid.c */
|
||||
extern void psb_lid_timer_init(struct drm_psb_private *dev_priv);
|
||||
extern void psb_lid_timer_takedown(struct drm_psb_private *dev_priv);
|
||||
|
||||
/* modesetting */
|
||||
extern void psb_modeset_init(struct drm_device *dev);
|
||||
extern void psb_modeset_cleanup(struct drm_device *dev);
|
||||
|
@ -1,80 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/**************************************************************************
|
||||
* Copyright (c) 2007, Intel Corporation.
|
||||
*
|
||||
* Authors: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
|
||||
**************************************************************************/
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#include "psb_drv.h"
|
||||
#include "psb_intel_reg.h"
|
||||
#include "psb_reg.h"
|
||||
|
||||
static void psb_lid_timer_func(struct timer_list *t)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = from_timer(dev_priv, t, lid_timer);
|
||||
struct drm_device *dev = (struct drm_device *)&dev_priv->dev;
|
||||
struct timer_list *lid_timer = &dev_priv->lid_timer;
|
||||
unsigned long irq_flags;
|
||||
u32 __iomem *lid_state = dev_priv->opregion.lid_state;
|
||||
u32 pp_status;
|
||||
|
||||
if (readl(lid_state) == dev_priv->lid_last_state)
|
||||
goto lid_timer_schedule;
|
||||
|
||||
if ((readl(lid_state)) & 0x01) {
|
||||
/*lid state is open*/
|
||||
REG_WRITE(PP_CONTROL, REG_READ(PP_CONTROL) | POWER_TARGET_ON);
|
||||
do {
|
||||
pp_status = REG_READ(PP_STATUS);
|
||||
} while ((pp_status & PP_ON) == 0 &&
|
||||
(pp_status & PP_SEQUENCE_MASK) != 0);
|
||||
|
||||
if (REG_READ(PP_STATUS) & PP_ON) {
|
||||
/*FIXME: should be backlight level before*/
|
||||
psb_intel_lvds_set_brightness(dev, 100);
|
||||
} else {
|
||||
DRM_DEBUG("LVDS panel never powered up");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
psb_intel_lvds_set_brightness(dev, 0);
|
||||
|
||||
REG_WRITE(PP_CONTROL, REG_READ(PP_CONTROL) & ~POWER_TARGET_ON);
|
||||
do {
|
||||
pp_status = REG_READ(PP_STATUS);
|
||||
} while ((pp_status & PP_ON) == 0);
|
||||
}
|
||||
dev_priv->lid_last_state = readl(lid_state);
|
||||
|
||||
lid_timer_schedule:
|
||||
spin_lock_irqsave(&dev_priv->lid_lock, irq_flags);
|
||||
if (!timer_pending(lid_timer)) {
|
||||
lid_timer->expires = jiffies + PSB_LID_DELAY;
|
||||
add_timer(lid_timer);
|
||||
}
|
||||
spin_unlock_irqrestore(&dev_priv->lid_lock, irq_flags);
|
||||
}
|
||||
|
||||
void psb_lid_timer_init(struct drm_psb_private *dev_priv)
|
||||
{
|
||||
struct timer_list *lid_timer = &dev_priv->lid_timer;
|
||||
unsigned long irq_flags;
|
||||
|
||||
spin_lock_init(&dev_priv->lid_lock);
|
||||
spin_lock_irqsave(&dev_priv->lid_lock, irq_flags);
|
||||
|
||||
timer_setup(lid_timer, psb_lid_timer_func, 0);
|
||||
|
||||
lid_timer->expires = jiffies + PSB_LID_DELAY;
|
||||
|
||||
add_timer(lid_timer);
|
||||
spin_unlock_irqrestore(&dev_priv->lid_lock, irq_flags);
|
||||
}
|
||||
|
||||
void psb_lid_timer_takedown(struct drm_psb_private *dev_priv)
|
||||
{
|
||||
del_timer_sync(&dev_priv->lid_timer);
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ err_mutex_unlock:
|
||||
*/
|
||||
static vm_fault_t fb_deferred_io_page_mkwrite(struct fb_info *info, struct vm_fault *vmf)
|
||||
{
|
||||
unsigned long offset = vmf->address - vmf->vma->vm_start;
|
||||
unsigned long offset = vmf->pgoff << PAGE_SHIFT;
|
||||
struct page *page = vmf->page;
|
||||
|
||||
file_update_time(vmf->vma->vm_file);
|
||||
|
Loading…
Reference in New Issue
Block a user