forked from Minki/linux
Short summary of fixes pull:
* edid: Fix EDID 1.4 range-descriptor parsing * panfrost: Fix devfreq OPP * ttm: Fix ghost-object bulk moves -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmMZ4foACgkQaA3BHVML eiOK+Qf9GxXFNlnItVR2q3u027MWrxmMIqCqiQdP2p8gts8MUnQZPQybdcrVbib6 Zzk297+bGNmVJp4VnX1XqBj4amgwW5xjrSCIWDSPmO+MZTEi4KjHQ5u22LvZXPWP iiGXzlOCND9I3Imf0g9sLhHQE42oXa+O54kXE9oS4PNoI56r7B9WuXtZfwsRJSQp XktbE8wMiLDQHL3h+/H11h5ED/2A5nq7Zab8GyzPhBxiZ5rUWBX5CLdwp1+5jpze Kf34d4ZSxIwPlVV3XVi+0sr4vIdtIBgB1P6iljgyRK/a0rT+5wFZQgAPthODLsXE MSNBqe2DcQ3mLhuf6cN65IEqPXFKRw== =g9Cz -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2022-09-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Short summary of fixes pull: * edid: Fix EDID 1.4 range-descriptor parsing * panfrost: Fix devfreq OPP * ttm: Fix ghost-object bulk moves Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/YxniKN4rK4qPp+J9@linux-uq9g
This commit is contained in:
commit
b34c1d5389
@ -377,8 +377,8 @@ static int vrr_range_show(struct seq_file *m, void *data)
|
||||
if (connector->status != connector_status_connected)
|
||||
return -ENODEV;
|
||||
|
||||
seq_printf(m, "Min: %u\n", (u8)connector->display_info.monitor_range.min_vfreq);
|
||||
seq_printf(m, "Max: %u\n", (u8)connector->display_info.monitor_range.max_vfreq);
|
||||
seq_printf(m, "Min: %u\n", connector->display_info.monitor_range.min_vfreq);
|
||||
seq_printf(m, "Max: %u\n", connector->display_info.monitor_range.max_vfreq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -5971,12 +5971,14 @@ static void drm_parse_cea_ext(struct drm_connector *connector,
|
||||
}
|
||||
|
||||
static
|
||||
void get_monitor_range(const struct detailed_timing *timing,
|
||||
void *info_monitor_range)
|
||||
void get_monitor_range(const struct detailed_timing *timing, void *c)
|
||||
{
|
||||
struct drm_monitor_range_info *monitor_range = info_monitor_range;
|
||||
struct detailed_mode_closure *closure = c;
|
||||
struct drm_display_info *info = &closure->connector->display_info;
|
||||
struct drm_monitor_range_info *monitor_range = &info->monitor_range;
|
||||
const struct detailed_non_pixel *data = &timing->data.other_data;
|
||||
const struct detailed_data_monitor_range *range = &data->data.range;
|
||||
const struct edid *edid = closure->drm_edid->edid;
|
||||
|
||||
if (!is_display_descriptor(timing, EDID_DETAIL_MONITOR_RANGE))
|
||||
return;
|
||||
@ -5992,18 +5994,28 @@ void get_monitor_range(const struct detailed_timing *timing,
|
||||
|
||||
monitor_range->min_vfreq = range->min_vfreq;
|
||||
monitor_range->max_vfreq = range->max_vfreq;
|
||||
|
||||
if (edid->revision >= 4) {
|
||||
if (data->pad2 & DRM_EDID_RANGE_OFFSET_MIN_VFREQ)
|
||||
monitor_range->min_vfreq += 255;
|
||||
if (data->pad2 & DRM_EDID_RANGE_OFFSET_MAX_VFREQ)
|
||||
monitor_range->max_vfreq += 255;
|
||||
}
|
||||
}
|
||||
|
||||
static void drm_get_monitor_range(struct drm_connector *connector,
|
||||
const struct drm_edid *drm_edid)
|
||||
{
|
||||
struct drm_display_info *info = &connector->display_info;
|
||||
const struct drm_display_info *info = &connector->display_info;
|
||||
struct detailed_mode_closure closure = {
|
||||
.connector = connector,
|
||||
.drm_edid = drm_edid,
|
||||
};
|
||||
|
||||
if (!version_greater(drm_edid, 1, 1))
|
||||
return;
|
||||
|
||||
drm_for_each_detailed_block(drm_edid, get_monitor_range,
|
||||
&info->monitor_range);
|
||||
drm_for_each_detailed_block(drm_edid, get_monitor_range, &closure);
|
||||
|
||||
DRM_DEBUG_KMS("Supported Monitor Refresh rate range is %d Hz - %d Hz\n",
|
||||
info->monitor_range.min_vfreq,
|
||||
|
@ -131,6 +131,17 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)
|
||||
return PTR_ERR(opp);
|
||||
|
||||
panfrost_devfreq_profile.initial_freq = cur_freq;
|
||||
|
||||
/*
|
||||
* Set the recommend OPP this will enable and configure the regulator
|
||||
* if any and will avoid a switch off by regulator_late_cleanup()
|
||||
*/
|
||||
ret = dev_pm_opp_set_opp(dev, opp);
|
||||
if (ret) {
|
||||
DRM_DEV_ERROR(dev, "Couldn't set recommended OPP\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
dev_pm_opp_put(opp);
|
||||
|
||||
/*
|
||||
|
@ -236,16 +236,19 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo,
|
||||
if (bo->type != ttm_bo_type_sg)
|
||||
fbo->base.base.resv = &fbo->base.base._resv;
|
||||
|
||||
if (fbo->base.resource) {
|
||||
ttm_resource_set_bo(fbo->base.resource, &fbo->base);
|
||||
bo->resource = NULL;
|
||||
}
|
||||
|
||||
dma_resv_init(&fbo->base.base._resv);
|
||||
fbo->base.base.dev = NULL;
|
||||
ret = dma_resv_trylock(&fbo->base.base._resv);
|
||||
WARN_ON(!ret);
|
||||
|
||||
if (fbo->base.resource) {
|
||||
ttm_resource_set_bo(fbo->base.resource, &fbo->base);
|
||||
bo->resource = NULL;
|
||||
ttm_bo_set_bulk_move(&fbo->base, NULL);
|
||||
} else {
|
||||
fbo->base.bulk_move = NULL;
|
||||
}
|
||||
|
||||
ret = dma_resv_reserve_fences(&fbo->base.base._resv, 1);
|
||||
if (ret) {
|
||||
kfree(fbo);
|
||||
|
@ -319,8 +319,8 @@ enum drm_panel_orientation {
|
||||
* EDID's detailed monitor range
|
||||
*/
|
||||
struct drm_monitor_range_info {
|
||||
u8 min_vfreq;
|
||||
u8 max_vfreq;
|
||||
u16 min_vfreq;
|
||||
u16 max_vfreq;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -92,6 +92,11 @@ struct detailed_data_string {
|
||||
u8 str[13];
|
||||
} __attribute__((packed));
|
||||
|
||||
#define DRM_EDID_RANGE_OFFSET_MIN_VFREQ (1 << 0) /* 1.4 */
|
||||
#define DRM_EDID_RANGE_OFFSET_MAX_VFREQ (1 << 1) /* 1.4 */
|
||||
#define DRM_EDID_RANGE_OFFSET_MIN_HFREQ (1 << 2) /* 1.4 */
|
||||
#define DRM_EDID_RANGE_OFFSET_MAX_HFREQ (1 << 3) /* 1.4 */
|
||||
|
||||
#define DRM_EDID_DEFAULT_GTF_SUPPORT_FLAG 0x00
|
||||
#define DRM_EDID_RANGE_LIMITS_ONLY_FLAG 0x01
|
||||
#define DRM_EDID_SECONDARY_GTF_SUPPORT_FLAG 0x02
|
||||
|
Loading…
Reference in New Issue
Block a user