sync with OpenBSD -current
This commit is contained in:
parent
b97c2ce374
commit
d93a7459f8
97 changed files with 717 additions and 833 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: nvme.c,v 1.118 2024/06/30 12:03:17 krw Exp $ */
|
||||
/* $OpenBSD: nvme.c,v 1.119 2024/07/08 16:07:36 krw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
|
||||
|
@ -1538,7 +1538,7 @@ nvme_q_free(struct nvme_softc *sc, struct nvme_queue *q)
|
|||
nvme_dmamem_sync(sc, q->q_cq_dmamem, BUS_DMASYNC_POSTREAD);
|
||||
nvme_dmamem_sync(sc, q->q_sq_dmamem, BUS_DMASYNC_POSTWRITE);
|
||||
|
||||
if (sc->sc_ops->op_q_alloc != NULL)
|
||||
if (sc->sc_ops->op_q_free != NULL)
|
||||
sc->sc_ops->op_q_free(sc, q);
|
||||
|
||||
nvme_dmamem_free(sc, q->q_cq_dmamem);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: kstat.c,v 1.2 2022/01/31 05:09:17 dlg Exp $ */
|
||||
/* $OpenBSD: kstat.c,v 1.3 2024/07/08 14:46:47 mpi Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2020 David Gwynne <dlg@openbsd.org>
|
||||
|
@ -593,7 +593,7 @@ kstat_cpu_enter(void *p)
|
|||
void
|
||||
kstat_cpu_leave(void *p)
|
||||
{
|
||||
atomic_clearbits_int(&curproc->p_flag, P_CPUPEG);
|
||||
sched_unpeg_curproc();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -399,7 +399,7 @@ amdgpu_atomfirmware_get_vram_info(struct amdgpu_device *adev,
|
|||
mem_channel_number = vram_info->v30.channel_num;
|
||||
mem_channel_width = vram_info->v30.channel_width;
|
||||
if (vram_width)
|
||||
*vram_width = mem_channel_number * (1 << mem_channel_width);
|
||||
*vram_width = mem_channel_number * 16;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
|
|
@ -4803,11 +4803,14 @@ int amdgpu_device_mode1_reset(struct amdgpu_device *adev)
|
|||
|
||||
dev_info(adev->dev, "GPU mode1 reset\n");
|
||||
|
||||
/* Cache the state before bus master disable. The saved config space
|
||||
* values are used in other cases like restore after mode-2 reset.
|
||||
*/
|
||||
amdgpu_device_cache_pci_state(adev->pdev);
|
||||
|
||||
/* disable BM */
|
||||
pci_clear_master(adev->pdev);
|
||||
|
||||
amdgpu_device_cache_pci_state(adev->pdev);
|
||||
|
||||
if (amdgpu_dpm_is_mode1_reset_supported(adev)) {
|
||||
dev_info(adev->dev, "GPU smu mode1 reset\n");
|
||||
ret = amdgpu_dpm_mode1_reset(adev);
|
||||
|
|
|
@ -1584,9 +1584,17 @@ static bool retrieve_link_cap(struct dc_link *link)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (dp_is_lttpr_present(link))
|
||||
if (dp_is_lttpr_present(link)) {
|
||||
configure_lttpr_mode_transparent(link);
|
||||
|
||||
// Echo TOTAL_LTTPR_CNT back downstream
|
||||
core_link_write_dpcd(
|
||||
link,
|
||||
DP_TOTAL_LTTPR_CNT,
|
||||
&link->dpcd_caps.lttpr_caps.phy_repeater_cnt,
|
||||
sizeof(link->dpcd_caps.lttpr_caps.phy_repeater_cnt));
|
||||
}
|
||||
|
||||
/* Read DP tunneling information. */
|
||||
status = dpcd_get_tunneling_device_data(link);
|
||||
|
||||
|
|
|
@ -177,4 +177,9 @@ enum dpcd_psr_sink_states {
|
|||
#define DP_SINK_PR_PIXEL_DEVIATION_PER_LINE 0x379
|
||||
#define DP_SINK_PR_MAX_NUMBER_OF_DEVIATION_LINE 0x37A
|
||||
|
||||
/* Remove once drm_dp_helper.h is updated upstream */
|
||||
#ifndef DP_TOTAL_LTTPR_CNT
|
||||
#define DP_TOTAL_LTTPR_CNT 0xF000A /* 2.1 */
|
||||
#endif
|
||||
|
||||
#endif /* __DAL_DPCD_DEFS_H__ */
|
||||
|
|
|
@ -532,6 +532,9 @@ struct fb_info *drm_fb_helper_alloc_info(struct drm_fb_helper *fb_helper)
|
|||
if (!info)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
if (!drm_leak_fbdev_smem)
|
||||
info->flags |= FBINFO_HIDE_SMEM_START;
|
||||
|
||||
#ifdef __linux__
|
||||
ret = fb_alloc_cmap(&info->cmap, 256, 0);
|
||||
if (ret)
|
||||
|
@ -1925,9 +1928,6 @@ __drm_fb_helper_initial_config_and_unlock(struct drm_fb_helper *fb_helper)
|
|||
info = fb_helper->info;
|
||||
info->var.pixclock = 0;
|
||||
|
||||
if (!drm_leak_fbdev_smem)
|
||||
info->flags |= FBINFO_HIDE_SMEM_START;
|
||||
|
||||
/* Need to drop locks to avoid recursive deadlock in
|
||||
* register_framebuffer. This is ok because the only thing left to do is
|
||||
* register the fbdev emulation instance in kernel_fb_helper_list. */
|
||||
|
|
|
@ -138,7 +138,10 @@ static int drm_fbdev_dma_helper_fb_probe(struct drm_fb_helper *fb_helper,
|
|||
info->flags |= FBINFO_READS_FAST; /* signal caching */
|
||||
info->screen_size = sizes->surface_height * fb->pitches[0];
|
||||
info->screen_buffer = map.vaddr;
|
||||
info->fix.smem_start = page_to_phys(virt_to_page(info->screen_buffer));
|
||||
if (!(info->flags & FBINFO_HIDE_SMEM_START)) {
|
||||
if (!drm_WARN_ON(dev, is_vmalloc_addr(info->screen_buffer)))
|
||||
info->fix.smem_start = page_to_phys(virt_to_page(info->screen_buffer));
|
||||
}
|
||||
info->fix.smem_len = info->screen_size;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -551,14 +551,12 @@ void drm_file_update_pid(struct drm_file *filp)
|
|||
|
||||
dev = filp->minor->dev;
|
||||
mutex_lock(&dev->filelist_mutex);
|
||||
get_pid(pid);
|
||||
old = rcu_replace_pointer(filp->pid, pid, 1);
|
||||
mutex_unlock(&dev->filelist_mutex);
|
||||
|
||||
if (pid != old) {
|
||||
get_pid(pid);
|
||||
synchronize_rcu();
|
||||
put_pid(old);
|
||||
}
|
||||
synchronize_rcu();
|
||||
put_pid(old);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -298,6 +298,7 @@ void i915_vma_revoke_fence(struct i915_vma *vma)
|
|||
return;
|
||||
|
||||
GEM_BUG_ON(fence->vma != vma);
|
||||
i915_active_wait(&fence->active);
|
||||
GEM_BUG_ON(!i915_active_is_idle(&fence->active));
|
||||
GEM_BUG_ON(atomic_read(&fence->pin_count));
|
||||
|
||||
|
|
|
@ -143,7 +143,6 @@ extern int radeon_cik_support;
|
|||
/* RADEON_IB_POOL_SIZE must be a power of 2 */
|
||||
#define RADEON_IB_POOL_SIZE 16
|
||||
#define RADEON_DEBUGFS_MAX_COMPONENTS 32
|
||||
#define RADEONFB_CONN_LIMIT 4
|
||||
#define RADEON_BIOS_NUM_SCRATCH 8
|
||||
|
||||
/* internal ring indices */
|
||||
|
|
|
@ -683,7 +683,7 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
|
|||
struct radeon_device *rdev = dev->dev_private;
|
||||
struct radeon_crtc *radeon_crtc;
|
||||
|
||||
radeon_crtc = kzalloc(sizeof(struct radeon_crtc) + (RADEONFB_CONN_LIMIT * sizeof(struct drm_connector *)), GFP_KERNEL);
|
||||
radeon_crtc = kzalloc(sizeof(*radeon_crtc), GFP_KERNEL);
|
||||
if (radeon_crtc == NULL)
|
||||
return;
|
||||
|
||||
|
@ -709,12 +709,6 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
|
|||
dev->mode_config.cursor_width = radeon_crtc->max_cursor_width;
|
||||
dev->mode_config.cursor_height = radeon_crtc->max_cursor_height;
|
||||
|
||||
#if 0
|
||||
radeon_crtc->mode_set.crtc = &radeon_crtc->base;
|
||||
radeon_crtc->mode_set.connectors = (struct drm_connector **)(radeon_crtc + 1);
|
||||
radeon_crtc->mode_set.num_connectors = 0;
|
||||
#endif
|
||||
|
||||
if (rdev->is_atom_bios && (ASIC_IS_AVIVO(rdev) || radeon_r4xx_atom))
|
||||
radeon_atombios_init_crtc(dev, radeon_crtc);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue