mirror of https://gitee.com/openkylin/linux.git
drm/tegra: Fixes for v3.14-rc3
These patches contain a fix for a potential hang when the RGB output is disabled twice, a typofix that prevents the framebuffer console from being restored on ->lastclose() and an optimization to do as little work as possible during host1x job submission. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJS+xxlAAoJEN0jrNd/PrOhccMQAL4gGMXoDI+LrPT99qjSvMN5 gxCQ5DUgKKNLWFp42phVvCbUyqOS8sYd3SBK8rAjmCnFLGyqlUp6CGecoH3Hhl47 j91CtkJDPytqMPSymxPH14JXxFvBq9e2AlKBKLEJcBE155KtaRbgPYsAfgMef81/ HBP+QfnteWMs3Mg8vWpUsMikGT7HQlYSEdCf0hptsuOe3AmUiUP1fGG77u3uKMbW iJZTuRenVCcPTvP9YpDYc2xG4QzcRwngHb/SuFL6vuMZlbRt/PCP/83y5QpJ+DnQ qyP6rzPUmnTcGZN0gfcy9MpMRuR97ptA6srpA1ZBowwTKGO95a5K8cGdIP3056dG ZyKRNEMlRT4Oo7xJu2jRd4vPGuJ/Xno5NY9RW0l6E8kit7Mutw5DWX5/gxis3YtE UVAy74qeWyYjM7Pi2PvZxPyZ09Gsma8oUF+KNnU69SvcZsfCzt4JB6C2WgWvpyiC A2kJcfa/JU69AvYHhLoz9EhbcBonu1KWF+mAgCNZWZL3qkRkKuXDI2op1y3CInVc 2agGHKqN9FWVOlvA8yuYEvlXpABLKbMCU2JNEtj9+fT1IuntRNY6qvigCUv1j/Gq St4KOHEOXF1qMp8Dn+i9UXqF8S+a291dACsDoagacIyy9zmwb6Cj9aN4OLzcp2vg kJJYyuQeAqiMsvstR8d2 =pQjy -----END PGP SIGNATURE----- Merge tag 'drm/for-3.14-rc3' of git://anongit.freedesktop.org/tegra/linux into drm-fixes drm/tegra: Fixes for v3.14-rc3 These patches contain a fix for a potential hang when the RGB output is disabled twice, a typofix that prevents the framebuffer console from being restored on ->lastclose() and an optimization to do as little work as possible during host1x job submission. * tag 'drm/for-3.14-rc3' of git://anongit.freedesktop.org/tegra/linux: drm/tegra: Add guard to avoid double disable/enable of RGB outputs gpu: host1x: do not check previously handled gathers drm/tegra: fix typo 'CONFIG_TEGRA_DRM_FBDEV'
This commit is contained in:
commit
5d7aad03c8
|
@ -104,7 +104,7 @@ static void tegra_drm_context_free(struct tegra_drm_context *context)
|
|||
|
||||
static void tegra_drm_lastclose(struct drm_device *drm)
|
||||
{
|
||||
#ifdef CONFIG_TEGRA_DRM_FBDEV
|
||||
#ifdef CONFIG_DRM_TEGRA_FBDEV
|
||||
struct tegra_drm *tegra = drm->dev_private;
|
||||
|
||||
tegra_fbdev_restore_mode(tegra->fbdev);
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
struct tegra_rgb {
|
||||
struct tegra_output output;
|
||||
struct tegra_dc *dc;
|
||||
bool enabled;
|
||||
|
||||
struct clk *clk_parent;
|
||||
struct clk *clk;
|
||||
|
@ -89,6 +90,9 @@ static int tegra_output_rgb_enable(struct tegra_output *output)
|
|||
struct tegra_rgb *rgb = to_rgb(output);
|
||||
unsigned long value;
|
||||
|
||||
if (rgb->enabled)
|
||||
return 0;
|
||||
|
||||
tegra_dc_write_regs(rgb->dc, rgb_enable, ARRAY_SIZE(rgb_enable));
|
||||
|
||||
value = DE_SELECT_ACTIVE | DE_CONTROL_NORMAL;
|
||||
|
@ -122,6 +126,8 @@ static int tegra_output_rgb_enable(struct tegra_output *output)
|
|||
tegra_dc_writel(rgb->dc, GENERAL_ACT_REQ << 8, DC_CMD_STATE_CONTROL);
|
||||
tegra_dc_writel(rgb->dc, GENERAL_ACT_REQ, DC_CMD_STATE_CONTROL);
|
||||
|
||||
rgb->enabled = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -130,6 +136,9 @@ static int tegra_output_rgb_disable(struct tegra_output *output)
|
|||
struct tegra_rgb *rgb = to_rgb(output);
|
||||
unsigned long value;
|
||||
|
||||
if (!rgb->enabled)
|
||||
return 0;
|
||||
|
||||
value = tegra_dc_readl(rgb->dc, DC_CMD_DISPLAY_POWER_CONTROL);
|
||||
value &= ~(PW0_ENABLE | PW1_ENABLE | PW2_ENABLE | PW3_ENABLE |
|
||||
PW4_ENABLE | PM0_ENABLE | PM1_ENABLE);
|
||||
|
@ -144,6 +153,8 @@ static int tegra_output_rgb_disable(struct tegra_output *output)
|
|||
|
||||
tegra_dc_write_regs(rgb->dc, rgb_disable, ARRAY_SIZE(rgb_disable));
|
||||
|
||||
rgb->enabled = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -538,7 +538,7 @@ int host1x_job_pin(struct host1x_job *job, struct device *dev)
|
|||
|
||||
g->base = job->gather_addr_phys[i];
|
||||
|
||||
for (j = 0; j < job->num_gathers; j++)
|
||||
for (j = i + 1; j < job->num_gathers; j++)
|
||||
if (job->gathers[j].bo == g->bo)
|
||||
job->gathers[j].handled = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue