From: Dave Airlie Date: Wed, 17 Jan 2018 23:32:15 +0000 (+1000) Subject: BackMerge tag 'v4.15-rc8' into drm-next X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4a6cc7a44e98a0460bd094b68c75f0705fdc450a;p=openwrt%2Fstaging%2Fblogic.git BackMerge tag 'v4.15-rc8' into drm-next Linux 4.15-rc8 Daniel requested this for so the intel CI won't fall over on drm-next so often. --- 4a6cc7a44e98a0460bd094b68c75f0705fdc450a diff --cc drivers/gpu/drm/drm_syncobj.c index 131695915acd,cb4d09c70fd4..0b7b0d1ad2d5 --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@@ -399,35 -369,9 +399,18 @@@ static const struct file_operations drm .release = drm_syncobj_file_release, }; - static int drm_syncobj_alloc_file(struct drm_syncobj *syncobj) - { - struct file *file = anon_inode_getfile("syncobj_file", - &drm_syncobj_file_fops, - syncobj, 0); - if (IS_ERR(file)) - return PTR_ERR(file); - - drm_syncobj_get(syncobj); - if (cmpxchg(&syncobj->file, NULL, file)) { - /* lost the race */ - fput(file); - } - - return 0; - } - +/** + * drm_syncobj_get_fd - get a file descriptor from a syncobj + * @syncobj: Sync object to export + * @p_fd: out parameter with the new file descriptor + * + * Exports a sync object created with drm_syncobj_create() as a file descriptor. + * + * Returns 0 on success or a negative error value on failure. + */ int drm_syncobj_get_fd(struct drm_syncobj *syncobj, int *p_fd) { - int ret; + struct file *file; int fd; fd = get_unused_fd_flags(O_CLOEXEC); diff --cc drivers/gpu/drm/i915/intel_cdclk.c index 9c5ceb98d48f,60cf4e58389a..d77e2bec1e29 --- a/drivers/gpu/drm/i915/intel_cdclk.c +++ b/drivers/gpu/drm/i915/intel_cdclk.c @@@ -994,9 -917,11 +988,9 @@@ static void skl_set_cdclk(struct drm_i9 { int cdclk = cdclk_state->cdclk; int vco = cdclk_state->vco; - u32 freq_select; - u32 freq_select, pcu_ack, cdclk_ctl; ++ u32 freq_select, cdclk_ctl; int ret; - WARN_ON((cdclk == 24000) != (vco == 0)); - mutex_lock(&dev_priv->pcu_lock); ret = skl_pcode_request(dev_priv, SKL_PCODE_CDCLK_CONTROL, SKL_CDCLK_PREPARE_FOR_CHANGE, @@@ -1009,16 -934,8 +1003,16 @@@ return; } - /* set CDCLK_CTL */ + /* Choose frequency for this cdclk */ switch (cdclk) { + default: + WARN_ON(cdclk != dev_priv->cdclk.hw.ref); + WARN_ON(vco != 0); + /* fall through */ + case 308571: + case 337500: + freq_select = CDCLK_FREQ_337_308; + break; case 450000: case 432000: freq_select = CDCLK_FREQ_450_432; diff --cc drivers/gpu/drm/sun4i/sun4i_tcon.c index a897f82d9e66,f4284b51bdca..b78fed809992 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@@ -946,26 -724,12 +946,26 @@@ static int sun4i_tcon_bind(struct devic if (IS_ERR(tcon->crtc)) { dev_err(dev, "Couldn't create our CRTC\n"); ret = PTR_ERR(tcon->crtc); - goto err_free_clocks; + goto err_free_dotclock; } - ret = sun4i_rgb_init(drm, tcon); + /* + * If we have an LVDS panel connected to the TCON, we should + * just probe the LVDS connector. Otherwise, just probe RGB as + * we used to. + */ + remote = of_graph_get_remote_node(dev->of_node, 1, 0); + if (of_device_is_compatible(remote, "panel-lvds")) + if (can_lvds) + ret = sun4i_lvds_init(drm, tcon); + else + ret = -EINVAL; + else + ret = sun4i_rgb_init(drm, tcon); + of_node_put(remote); + if (ret < 0) - goto err_free_clocks; + goto err_free_dotclock; if (tcon->quirks->needs_de_be_mux) { /*