Merge 1d28224d49 ("selftests/ftrace: Correctly enable event in instance-event.tc") into android11-5.4-lts

Steps on the way to 5.4.258

Change-Id: I30650e7c379c3504cf10665b7f396d2620627b38
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2023-10-24 16:10:30 +00:00
commit 82d0266c8c
23 changed files with 137 additions and 47 deletions

View File

@ -656,12 +656,12 @@
/* Configure pwm clock source for timers 8 & 9 */ /* Configure pwm clock source for timers 8 & 9 */
&timer8 { &timer8 {
assigned-clocks = <&abe_clkctrl OMAP4_TIMER8_CLKCTRL 24>; assigned-clocks = <&abe_clkctrl OMAP4_TIMER8_CLKCTRL 24>;
assigned-clock-parents = <&sys_clkin_ck>; assigned-clock-parents = <&sys_32k_ck>;
}; };
&timer9 { &timer9 {
assigned-clocks = <&l4_per_clkctrl OMAP4_TIMER9_CLKCTRL 24>; assigned-clocks = <&l4_per_clkctrl OMAP4_TIMER9_CLKCTRL 24>;
assigned-clock-parents = <&sys_clkin_ck>; assigned-clock-parents = <&sys_32k_ck>;
}; };
/* /*

View File

@ -164,6 +164,7 @@ static struct platform_device db1x00_audio_dev = {
/******************************************************************************/ /******************************************************************************/
#ifdef CONFIG_MMC_AU1X
static irqreturn_t db1100_mmc_cd(int irq, void *ptr) static irqreturn_t db1100_mmc_cd(int irq, void *ptr)
{ {
mmc_detect_change(ptr, msecs_to_jiffies(500)); mmc_detect_change(ptr, msecs_to_jiffies(500));
@ -369,6 +370,7 @@ static struct platform_device db1100_mmc1_dev = {
.num_resources = ARRAY_SIZE(au1100_mmc1_res), .num_resources = ARRAY_SIZE(au1100_mmc1_res),
.resource = au1100_mmc1_res, .resource = au1100_mmc1_res,
}; };
#endif /* CONFIG_MMC_AU1X */
/******************************************************************************/ /******************************************************************************/
@ -432,8 +434,10 @@ static struct platform_device *db1x00_devs[] = {
static struct platform_device *db1100_devs[] = { static struct platform_device *db1100_devs[] = {
&au1100_lcd_device, &au1100_lcd_device,
#ifdef CONFIG_MMC_AU1X
&db1100_mmc0_dev, &db1100_mmc0_dev,
&db1100_mmc1_dev, &db1100_mmc1_dev,
#endif
}; };
int __init db1000_dev_setup(void) int __init db1000_dev_setup(void)

View File

@ -326,6 +326,7 @@ static struct platform_device db1200_ide_dev = {
/**********************************************************************/ /**********************************************************************/
#ifdef CONFIG_MMC_AU1X
/* SD carddetects: they're supposed to be edge-triggered, but ack /* SD carddetects: they're supposed to be edge-triggered, but ack
* doesn't seem to work (CPLD Rev 2). Instead, the screaming one * doesn't seem to work (CPLD Rev 2). Instead, the screaming one
* is disabled and its counterpart enabled. The 200ms timeout is * is disabled and its counterpart enabled. The 200ms timeout is
@ -584,6 +585,7 @@ static struct platform_device pb1200_mmc1_dev = {
.num_resources = ARRAY_SIZE(au1200_mmc1_res), .num_resources = ARRAY_SIZE(au1200_mmc1_res),
.resource = au1200_mmc1_res, .resource = au1200_mmc1_res,
}; };
#endif /* CONFIG_MMC_AU1X */
/**********************************************************************/ /**********************************************************************/
@ -751,7 +753,9 @@ static struct platform_device db1200_audiodma_dev = {
static struct platform_device *db1200_devs[] __initdata = { static struct platform_device *db1200_devs[] __initdata = {
NULL, /* PSC0, selected by S6.8 */ NULL, /* PSC0, selected by S6.8 */
&db1200_ide_dev, &db1200_ide_dev,
#ifdef CONFIG_MMC_AU1X
&db1200_mmc0_dev, &db1200_mmc0_dev,
#endif
&au1200_lcd_dev, &au1200_lcd_dev,
&db1200_eth_dev, &db1200_eth_dev,
&db1200_nand_dev, &db1200_nand_dev,
@ -762,7 +766,9 @@ static struct platform_device *db1200_devs[] __initdata = {
}; };
static struct platform_device *pb1200_devs[] __initdata = { static struct platform_device *pb1200_devs[] __initdata = {
#ifdef CONFIG_MMC_AU1X
&pb1200_mmc1_dev, &pb1200_mmc1_dev,
#endif
}; };
/* Some peripheral base addresses differ on the PB1200 */ /* Some peripheral base addresses differ on the PB1200 */

View File

@ -450,6 +450,7 @@ static struct platform_device db1300_ide_dev = {
/**********************************************************************/ /**********************************************************************/
#ifdef CONFIG_MMC_AU1X
static irqreturn_t db1300_mmc_cd(int irq, void *ptr) static irqreturn_t db1300_mmc_cd(int irq, void *ptr)
{ {
disable_irq_nosync(irq); disable_irq_nosync(irq);
@ -632,6 +633,7 @@ static struct platform_device db1300_sd0_dev = {
.resource = au1300_sd0_res, .resource = au1300_sd0_res,
.num_resources = ARRAY_SIZE(au1300_sd0_res), .num_resources = ARRAY_SIZE(au1300_sd0_res),
}; };
#endif /* CONFIG_MMC_AU1X */
/**********************************************************************/ /**********************************************************************/
@ -769,8 +771,10 @@ static struct platform_device *db1300_dev[] __initdata = {
&db1300_5waysw_dev, &db1300_5waysw_dev,
&db1300_nand_dev, &db1300_nand_dev,
&db1300_ide_dev, &db1300_ide_dev,
#ifdef CONFIG_MMC_AU1X
&db1300_sd0_dev, &db1300_sd0_dev,
&db1300_sd1_dev, &db1300_sd1_dev,
#endif
&db1300_lcd_dev, &db1300_lcd_dev,
&db1300_ac97_dev, &db1300_ac97_dev,
&db1300_i2s_dev, &db1300_i2s_dev,

View File

@ -86,6 +86,9 @@ struct sba_device {
struct ioc ioc[MAX_IOC]; struct ioc ioc[MAX_IOC];
}; };
/* list of SBA's in system, see drivers/parisc/sba_iommu.c */
extern struct sba_device *sba_list;
#define ASTRO_RUNWAY_PORT 0x582 #define ASTRO_RUNWAY_PORT 0x582
#define IKE_MERCED_PORT 0x803 #define IKE_MERCED_PORT 0x803
#define REO_MERCED_PORT 0x804 #define REO_MERCED_PORT 0x804

View File

@ -924,9 +924,9 @@ static __init void qemu_header(void)
pr_info("#define PARISC_MODEL \"%s\"\n\n", pr_info("#define PARISC_MODEL \"%s\"\n\n",
boot_cpu_data.pdc.sys_model_name); boot_cpu_data.pdc.sys_model_name);
#define p ((unsigned long *)&boot_cpu_data.pdc.model)
pr_info("#define PARISC_PDC_MODEL 0x%lx, 0x%lx, 0x%lx, " pr_info("#define PARISC_PDC_MODEL 0x%lx, 0x%lx, 0x%lx, "
"0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx\n\n", "0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx\n\n",
#define p ((unsigned long *)&boot_cpu_data.pdc.model)
p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8]); p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8]);
#undef p #undef p

View File

@ -388,7 +388,7 @@ union irq_stack_union {
volatile unsigned int lock[1]; volatile unsigned int lock[1];
}; };
DEFINE_PER_CPU(union irq_stack_union, irq_stack_union) = { static DEFINE_PER_CPU(union irq_stack_union, irq_stack_union) = {
.slock = { 1,1,1,1 }, .slock = { 1,1,1,1 },
}; };
#endif #endif

View File

@ -9,8 +9,7 @@
# KBUILD_CFLAGS used when building rest of boot (takes effect recursively) # KBUILD_CFLAGS used when building rest of boot (takes effect recursively)
KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include KBUILD_CFLAGS += -fno-builtin
HOSTFLAGS += -Iarch/$(ARCH)/boot/include
BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#") BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#")

View File

@ -4,13 +4,14 @@
/* bits taken from ppc */ /* bits taken from ppc */
extern void *avail_ram, *end_avail; extern void *avail_ram, *end_avail;
void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp);
void exit (void) static void exit(void)
{ {
for (;;); for (;;);
} }
void *zalloc(unsigned size) static void *zalloc(unsigned int size)
{ {
void *p = avail_ram; void *p = avail_ram;

View File

@ -6,6 +6,10 @@
#include <variant/core.h> #include <variant/core.h>
#ifndef XCHAL_HAVE_DIV32
#define XCHAL_HAVE_DIV32 0
#endif
#ifndef XCHAL_HAVE_EXCLUSIVE #ifndef XCHAL_HAVE_EXCLUSIVE
#define XCHAL_HAVE_EXCLUSIVE 0 #define XCHAL_HAVE_EXCLUSIVE 0
#endif #endif

View File

@ -204,7 +204,7 @@ static int tuntap_write(struct iss_net_private *lp, struct sk_buff **skb)
return simc_write(lp->tp.info.tuntap.fd, (*skb)->data, (*skb)->len); return simc_write(lp->tp.info.tuntap.fd, (*skb)->data, (*skb)->len);
} }
unsigned short tuntap_protocol(struct sk_buff *skb) static unsigned short tuntap_protocol(struct sk_buff *skb)
{ {
return eth_type_trans(skb, skb->dev); return eth_type_trans(skb, skb->dev);
} }
@ -477,7 +477,7 @@ static int iss_net_change_mtu(struct net_device *dev, int new_mtu)
return -EINVAL; return -EINVAL;
} }
void iss_net_user_timer_expire(struct timer_list *unused) static void iss_net_user_timer_expire(struct timer_list *unused)
{ {
} }

View File

@ -1838,6 +1838,15 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
else else
dev_info(&pdev->dev, "SSS flag set, parallel bus scan disabled\n"); dev_info(&pdev->dev, "SSS flag set, parallel bus scan disabled\n");
if (!(hpriv->cap & HOST_CAP_PART))
host->flags |= ATA_HOST_NO_PART;
if (!(hpriv->cap & HOST_CAP_SSC))
host->flags |= ATA_HOST_NO_SSC;
if (!(hpriv->cap2 & HOST_CAP2_SDS))
host->flags |= ATA_HOST_NO_DEVSLP;
if (pi.flags & ATA_FLAG_EM) if (pi.flags & ATA_FLAG_EM)
ahci_reset_em(host); ahci_reset_em(host);

View File

@ -3981,10 +3981,23 @@ int sata_link_scr_lpm(struct ata_link *link, enum ata_lpm_policy policy,
case ATA_LPM_MED_POWER_WITH_DIPM: case ATA_LPM_MED_POWER_WITH_DIPM:
case ATA_LPM_MIN_POWER_WITH_PARTIAL: case ATA_LPM_MIN_POWER_WITH_PARTIAL:
case ATA_LPM_MIN_POWER: case ATA_LPM_MIN_POWER:
if (ata_link_nr_enabled(link) > 0) if (ata_link_nr_enabled(link) > 0) {
/* no restrictions on LPM transitions */ /* assume no restrictions on LPM transitions */
scontrol &= ~(0x7 << 8); scontrol &= ~(0x7 << 8);
else {
/*
* If the controller does not support partial, slumber,
* or devsleep, then disallow these transitions.
*/
if (link->ap->host->flags & ATA_HOST_NO_PART)
scontrol |= (0x1 << 8);
if (link->ap->host->flags & ATA_HOST_NO_SSC)
scontrol |= (0x2 << 8);
if (link->ap->host->flags & ATA_HOST_NO_DEVSLP)
scontrol |= (0x4 << 8);
} else {
/* empty port, power off */ /* empty port, power off */
scontrol &= ~0xf; scontrol &= ~0xf;
scontrol |= (0x1 << 2); scontrol |= (0x1 << 2);

View File

@ -1023,6 +1023,11 @@ static int sysc_enable_module(struct device *dev)
if (ddata->cfg.quirks & (SYSC_QUIRK_SWSUP_SIDLE | if (ddata->cfg.quirks & (SYSC_QUIRK_SWSUP_SIDLE |
SYSC_QUIRK_SWSUP_SIDLE_ACT)) { SYSC_QUIRK_SWSUP_SIDLE_ACT)) {
best_mode = SYSC_IDLE_NO; best_mode = SYSC_IDLE_NO;
/* Clear WAKEUP */
if (regbits->enwkup_shift >= 0 &&
ddata->cfg.sysc_val & BIT(regbits->enwkup_shift))
reg &= ~BIT(regbits->enwkup_shift);
} else { } else {
best_mode = fls(ddata->cfg.sidlemodes) - 1; best_mode = fls(ddata->cfg.sidlemodes) - 1;
if (best_mode > SYSC_IDLE_MASK) { if (best_mode > SYSC_IDLE_MASK) {
@ -1143,6 +1148,13 @@ set_sidle:
} }
} }
if (ddata->cfg.quirks & SYSC_QUIRK_SWSUP_SIDLE_ACT) {
/* Set WAKEUP */
if (regbits->enwkup_shift >= 0 &&
ddata->cfg.sysc_val & BIT(regbits->enwkup_shift))
reg |= BIT(regbits->enwkup_shift);
}
reg &= ~(SYSC_IDLE_MASK << regbits->sidle_shift); reg &= ~(SYSC_IDLE_MASK << regbits->sidle_shift);
reg |= best_mode << regbits->sidle_shift; reg |= best_mode << regbits->sidle_shift;
if (regbits->autoidle_shift >= 0 && if (regbits->autoidle_shift >= 0 &&
@ -1371,16 +1383,16 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
SYSC_QUIRK("timer", 0, 0, 0x10, -ENODEV, 0x4fff1301, 0xffff00ff, SYSC_QUIRK("timer", 0, 0, 0x10, -ENODEV, 0x4fff1301, 0xffff00ff,
0), 0),
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000046, 0xffffffff, SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000046, 0xffffffff,
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE), SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000052, 0xffffffff, SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000052, 0xffffffff,
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE), SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
/* Uarts on omap4 and later */ /* Uarts on omap4 and later */
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x50411e03, 0xffff00ff, SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x50411e03, 0xffff00ff,
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE), SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47422e03, 0xffffffff, SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47422e03, 0xffffffff,
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE), SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47424e03, 0xffffffff, SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x47424e03, 0xffffffff,
SYSC_QUIRK_SWSUP_SIDLE | SYSC_QUIRK_LEGACY_IDLE), SYSC_QUIRK_SWSUP_SIDLE_ACT | SYSC_QUIRK_LEGACY_IDLE),
/* Quirks that need to be set based on the module address */ /* Quirks that need to be set based on the module address */
SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -ENODEV, 0x50000800, 0xffffffff, SYSC_QUIRK("mcpdm", 0x40132000, 0, 0x10, -ENODEV, 0x50000800, 0xffffffff,

View File

@ -394,8 +394,6 @@ find_quicksilver(struct device *dev, void *data)
static int __init static int __init
parisc_agp_init(void) parisc_agp_init(void)
{ {
extern struct sba_device *sba_list;
int err = -1; int err = -1;
struct parisc_device *sba = NULL, *lba = NULL; struct parisc_device *sba = NULL, *lba = NULL;
struct lba_device *lbadev = NULL; struct lba_device *lbadev = NULL;

View File

@ -159,7 +159,7 @@ static unsigned long tegra_bpmp_clk_recalc_rate(struct clk_hw *hw,
err = tegra_bpmp_clk_transfer(clk->bpmp, &msg); err = tegra_bpmp_clk_transfer(clk->bpmp, &msg);
if (err < 0) if (err < 0)
return err; return 0;
return response.rate; return response.rate;
} }

View File

@ -338,6 +338,7 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev)
pmic_eic->chip.set_config = sprd_pmic_eic_set_config; pmic_eic->chip.set_config = sprd_pmic_eic_set_config;
pmic_eic->chip.set = sprd_pmic_eic_set; pmic_eic->chip.set = sprd_pmic_eic_set;
pmic_eic->chip.get = sprd_pmic_eic_get; pmic_eic->chip.get = sprd_pmic_eic_get;
pmic_eic->chip.can_sleep = true;
pmic_eic->intc.name = dev_name(&pdev->dev); pmic_eic->intc.name = dev_name(&pdev->dev);
pmic_eic->intc.irq_mask = sprd_pmic_eic_irq_mask; pmic_eic->intc.irq_mask = sprd_pmic_eic_irq_mask;

View File

@ -37,8 +37,8 @@
#define STATIC_SCREEN_RAMP_DELTA_REFRESH_RATE_PER_FRAME ((1000 / 60) * 65) #define STATIC_SCREEN_RAMP_DELTA_REFRESH_RATE_PER_FRAME ((1000 / 60) * 65)
/* Number of elements in the render times cache array */ /* Number of elements in the render times cache array */
#define RENDER_TIMES_MAX_COUNT 10 #define RENDER_TIMES_MAX_COUNT 10
/* Threshold to exit BTR (to avoid frequent enter-exits at the lower limit) */ /* Threshold to exit/exit BTR (to avoid frequent enter-exits at the lower limit) */
#define BTR_EXIT_MARGIN 2000 #define BTR_MAX_MARGIN 2500
/* Threshold to change BTR multiplier (to avoid frequent changes) */ /* Threshold to change BTR multiplier (to avoid frequent changes) */
#define BTR_DRIFT_MARGIN 2000 #define BTR_DRIFT_MARGIN 2000
/*Threshold to exit fixed refresh rate*/ /*Threshold to exit fixed refresh rate*/
@ -250,24 +250,22 @@ static void apply_below_the_range(struct core_freesync *core_freesync,
unsigned int delta_from_mid_point_in_us_1 = 0xFFFFFFFF; unsigned int delta_from_mid_point_in_us_1 = 0xFFFFFFFF;
unsigned int delta_from_mid_point_in_us_2 = 0xFFFFFFFF; unsigned int delta_from_mid_point_in_us_2 = 0xFFFFFFFF;
unsigned int frames_to_insert = 0; unsigned int frames_to_insert = 0;
unsigned int min_frame_duration_in_ns = 0;
unsigned int max_render_time_in_us = in_out_vrr->max_duration_in_us;
unsigned int delta_from_mid_point_delta_in_us; unsigned int delta_from_mid_point_delta_in_us;
unsigned int max_render_time_in_us =
min_frame_duration_in_ns = ((unsigned int) (div64_u64( in_out_vrr->max_duration_in_us - in_out_vrr->btr.margin_in_us;
(1000000000ULL * 1000000),
in_out_vrr->max_refresh_in_uhz)));
/* Program BTR */ /* Program BTR */
if (last_render_time_in_us + BTR_EXIT_MARGIN < max_render_time_in_us) { if ((last_render_time_in_us + in_out_vrr->btr.margin_in_us / 2) < max_render_time_in_us) {
/* Exit Below the Range */ /* Exit Below the Range */
if (in_out_vrr->btr.btr_active) { if (in_out_vrr->btr.btr_active) {
in_out_vrr->btr.frame_counter = 0; in_out_vrr->btr.frame_counter = 0;
in_out_vrr->btr.btr_active = false; in_out_vrr->btr.btr_active = false;
} }
} else if (last_render_time_in_us > max_render_time_in_us) { } else if (last_render_time_in_us > (max_render_time_in_us + in_out_vrr->btr.margin_in_us / 2)) {
/* Enter Below the Range */ /* Enter Below the Range */
in_out_vrr->btr.btr_active = true; if (!in_out_vrr->btr.btr_active) {
in_out_vrr->btr.btr_active = true;
}
} }
/* BTR set to "not active" so disengage */ /* BTR set to "not active" so disengage */
@ -322,24 +320,50 @@ static void apply_below_the_range(struct core_freesync *core_freesync,
/* Choose number of frames to insert based on how close it /* Choose number of frames to insert based on how close it
* can get to the mid point of the variable range. * can get to the mid point of the variable range.
* - Delta for CEIL: delta_from_mid_point_in_us_1
* - Delta for FLOOR: delta_from_mid_point_in_us_2
*/ */
if (delta_from_mid_point_in_us_1 < delta_from_mid_point_in_us_2) { if (mid_point_frames_ceil &&
frames_to_insert = mid_point_frames_ceil; (last_render_time_in_us / mid_point_frames_ceil) <
delta_from_mid_point_delta_in_us = delta_from_mid_point_in_us_2 - in_out_vrr->min_duration_in_us) {
delta_from_mid_point_in_us_1; /* Check for out of range.
} else { * If using CEIL produces a value that is out of range,
* then we are forced to use FLOOR.
*/
frames_to_insert = mid_point_frames_floor;
} else if (mid_point_frames_floor < 2) {
/* Check if FLOOR would result in non-LFC. In this case
* choose to use CEIL
*/
frames_to_insert = mid_point_frames_ceil;
} else if (delta_from_mid_point_in_us_1 < delta_from_mid_point_in_us_2) {
/* If choosing CEIL results in a frame duration that is
* closer to the mid point of the range.
* Choose CEIL
*/
frames_to_insert = mid_point_frames_ceil;
} else {
/* If choosing FLOOR results in a frame duration that is
* closer to the mid point of the range.
* Choose FLOOR
*/
frames_to_insert = mid_point_frames_floor; frames_to_insert = mid_point_frames_floor;
delta_from_mid_point_delta_in_us = delta_from_mid_point_in_us_1 -
delta_from_mid_point_in_us_2;
} }
/* Prefer current frame multiplier when BTR is enabled unless it drifts /* Prefer current frame multiplier when BTR is enabled unless it drifts
* too far from the midpoint * too far from the midpoint
*/ */
if (delta_from_mid_point_in_us_1 < delta_from_mid_point_in_us_2) {
delta_from_mid_point_delta_in_us = delta_from_mid_point_in_us_2 -
delta_from_mid_point_in_us_1;
} else {
delta_from_mid_point_delta_in_us = delta_from_mid_point_in_us_1 -
delta_from_mid_point_in_us_2;
}
if (in_out_vrr->btr.frames_to_insert != 0 && if (in_out_vrr->btr.frames_to_insert != 0 &&
delta_from_mid_point_delta_in_us < BTR_DRIFT_MARGIN) { delta_from_mid_point_delta_in_us < BTR_DRIFT_MARGIN) {
if (((last_render_time_in_us / in_out_vrr->btr.frames_to_insert) < if (((last_render_time_in_us / in_out_vrr->btr.frames_to_insert) <
in_out_vrr->max_duration_in_us) && max_render_time_in_us) &&
((last_render_time_in_us / in_out_vrr->btr.frames_to_insert) > ((last_render_time_in_us / in_out_vrr->btr.frames_to_insert) >
in_out_vrr->min_duration_in_us)) in_out_vrr->min_duration_in_us))
frames_to_insert = in_out_vrr->btr.frames_to_insert; frames_to_insert = in_out_vrr->btr.frames_to_insert;
@ -348,8 +372,9 @@ static void apply_below_the_range(struct core_freesync *core_freesync,
/* Either we've calculated the number of frames to insert, /* Either we've calculated the number of frames to insert,
* or we need to insert min duration frames * or we need to insert min duration frames
*/ */
if (last_render_time_in_us / frames_to_insert < if (frames_to_insert &&
in_out_vrr->min_duration_in_us){ (last_render_time_in_us / frames_to_insert) <
in_out_vrr->min_duration_in_us){
frames_to_insert -= (frames_to_insert > 1) ? frames_to_insert -= (frames_to_insert > 1) ?
1 : 0; 1 : 0;
} }
@ -792,6 +817,11 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
refresh_range = in_out_vrr->max_refresh_in_uhz - refresh_range = in_out_vrr->max_refresh_in_uhz -
in_out_vrr->min_refresh_in_uhz; in_out_vrr->min_refresh_in_uhz;
in_out_vrr->btr.margin_in_us = in_out_vrr->max_duration_in_us -
2 * in_out_vrr->min_duration_in_us;
if (in_out_vrr->btr.margin_in_us > BTR_MAX_MARGIN)
in_out_vrr->btr.margin_in_us = BTR_MAX_MARGIN;
in_out_vrr->supported = true; in_out_vrr->supported = true;
} }
@ -808,6 +838,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
in_out_vrr->btr.inserted_duration_in_us = 0; in_out_vrr->btr.inserted_duration_in_us = 0;
in_out_vrr->btr.frames_to_insert = 0; in_out_vrr->btr.frames_to_insert = 0;
in_out_vrr->btr.frame_counter = 0; in_out_vrr->btr.frame_counter = 0;
in_out_vrr->btr.mid_point_in_us = in_out_vrr->btr.mid_point_in_us =
(in_out_vrr->min_duration_in_us + (in_out_vrr->min_duration_in_us +
in_out_vrr->max_duration_in_us) / 2; in_out_vrr->max_duration_in_us) / 2;

View File

@ -92,6 +92,7 @@ struct mod_vrr_params_btr {
uint32_t inserted_duration_in_us; uint32_t inserted_duration_in_us;
uint32_t frames_to_insert; uint32_t frames_to_insert;
uint32_t frame_counter; uint32_t frame_counter;
uint32_t margin_in_us;
}; };
struct mod_vrr_params_fixed_refresh { struct mod_vrr_params_fixed_refresh {

View File

@ -202,9 +202,9 @@ static inline void iosapic_write(void __iomem *iosapic, unsigned int reg, u32 va
static DEFINE_SPINLOCK(iosapic_lock); static DEFINE_SPINLOCK(iosapic_lock);
static inline void iosapic_eoi(void __iomem *addr, unsigned int data) static inline void iosapic_eoi(__le32 __iomem *addr, __le32 data)
{ {
__raw_writel(data, addr); __raw_writel((__force u32)data, addr);
} }
/* /*

View File

@ -118,8 +118,8 @@ struct iosapic_irt {
struct vector_info { struct vector_info {
struct iosapic_info *iosapic; /* I/O SAPIC this vector is on */ struct iosapic_info *iosapic; /* I/O SAPIC this vector is on */
struct irt_entry *irte; /* IRT entry */ struct irt_entry *irte; /* IRT entry */
u32 __iomem *eoi_addr; /* precalculate EOI reg address */ __le32 __iomem *eoi_addr; /* precalculate EOI reg address */
u32 eoi_data; /* IA64: ? PA: swapped txn_data */ __le32 eoi_data; /* IA64: ? PA: swapped txn_data */
int txn_irq; /* virtual IRQ number for processor */ int txn_irq; /* virtual IRQ number for processor */
ulong txn_addr; /* IA64: id_eid PA: partial HPA */ ulong txn_addr; /* IA64: id_eid PA: partial HPA */
u32 txn_data; /* CPU interrupt bit */ u32 txn_data; /* CPU interrupt bit */

View File

@ -261,6 +261,10 @@ enum {
ATA_HOST_PARALLEL_SCAN = (1 << 2), /* Ports on this host can be scanned in parallel */ ATA_HOST_PARALLEL_SCAN = (1 << 2), /* Ports on this host can be scanned in parallel */
ATA_HOST_IGNORE_ATA = (1 << 3), /* Ignore ATA devices on this host. */ ATA_HOST_IGNORE_ATA = (1 << 3), /* Ignore ATA devices on this host. */
ATA_HOST_NO_PART = (1 << 4), /* Host does not support partial */
ATA_HOST_NO_SSC = (1 << 5), /* Host does not support slumber */
ATA_HOST_NO_DEVSLP = (1 << 6), /* Host does not support devslp */
/* bits 24:31 of host->flags are reserved for LLD specific flags */ /* bits 24:31 of host->flags are reserved for LLD specific flags */
/* various lengths of time */ /* various lengths of time */

View File

@ -43,7 +43,7 @@ instance_read() {
instance_set() { instance_set() {
while :; do while :; do
echo 1 > foo/events/sched/sched_switch echo 1 > foo/events/sched/sched_switch/enable
done 2> /dev/null done 2> /dev/null
} }