[Bug 65730] no sound via HDMI for Radeon 6850 mesa driver

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65730

--- Comment #3 from Alex Deucher  ---
Created attachment 80801
  --> https://bugs.freedesktop.org/attachment.cgi?id=80801=edit
fix AVI infoframe

Does the attached kernel patch along with the radeon.audio=1 help?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/59007bb4/attachment.html>


[Bug 65730] no sound via HDMI for Radeon 6850 mesa driver

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65730

--- Comment #2 from Jason  ---
Indeed I had already tried that in my /etc/default/grub file.  I edited both
lines and rebooted...
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.audio=1"
GRUB_CMDLINE_LINUX="radeon.audio=1"

Sound does not work.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/09d1e03e/attachment.html>


[PATCH] drm/edid: Don't print messages regarding stereo or csync by default

2013-06-13 Thread Egbert Eich
drm_mode_detailed() is called quite often, therefore when a monitor
that has a detailed timing mode marked DRM_EDID_PT_STEREO or requiring
composite sync, warning messages will clutter up the kernel log.
Like we already do for incorrect hsync/vsync pluse widths, print these
messages only when KMS debugging is enabled.

Signed-off-by: Egbert Eich 
---
 drivers/gpu/drm/drm_edid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index e8d17ee..2dc1a60 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1706,11 +1706,11 @@ static struct drm_display_mode 
*drm_mode_detailed(struct drm_device *dev,
return NULL;

if (pt->misc & DRM_EDID_PT_STEREO) {
-   printk(KERN_WARNING "stereo mode not supported\n");
+   DRM_DEBUG_KMS("stereo mode not supported\n");
return NULL;
}
if (!(pt->misc & DRM_EDID_PT_SEPARATE_SYNC)) {
-   printk(KERN_WARNING "composite sync not supported\n");
+   DRM_DEBUG_KMS("composite sync not supported\n");
}

/* it is incorrect if hsync/vsync width is zero */
-- 
1.8.1.4



[PATCH 1/1] dRM/exynos: exynos_drm_ipp: Remove redundant break statement

2013-06-13 Thread Inki Dae
Applied.

Thanks,
Inki Dae


2013/6/11 Sachin Kamat 

> 'break' after goto statement is redundant. Silences the following
> message:
> drivers/gpu/drm/exynos/exynos_drm_ipp.c:1067 exynos_drm_ipp_check_valid()
> info: ignoring unreachable code.
>
> Signed-off-by: Sachin Kamat 
> ---
>  drivers/gpu/drm/exynos/exynos_drm_ipp.c |1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
> b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
> index 01cb9a0..b1ef8e7 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
> @@ -1064,7 +1064,6 @@ static bool exynos_drm_ipp_check_valid(struct device
> *dev,
> default:
> DRM_ERROR("invalid state.\n");
> goto err_status;
> -   break;
> }
>
> return true;
> --
> 1.7.9.5
>
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
-- next part ------
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/68b0094e/attachment.html>


[PATCH 4/4] ARM/dts: add clocks to hdmi dt node for exynos5250

2013-06-13 Thread Inki Dae
Acked-by: Inki Dae 

Thanks,
Inki Dae


2013/6/11 Rahul Sharma 

> Fix wrong clock numbers in hdmi dt node. Removed hdmiphy
> clock which was a dummy clock earlier and not required now.
> Also added mux clock to change the clock parent.
>
> Signed-off-by: Rahul Sharma 
> ---
>  arch/arm/boot/dts/exynos5250.dtsi |6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi
> b/arch/arm/boot/dts/exynos5250.dtsi
> index 9d9496a..354e14a 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -604,10 +604,10 @@
> compatible = "samsung,exynos5-hdmi";
> reg = <0x1453 0x7>;
> interrupts = <0 95 0>;
> -   clocks = < 333>, < 136>, < 137>,
> -   < 333>, < 333>;
> +   clocks = < 344>, < 136>, < 137>,
> +   < 157>, < 1024>;
> clock-names = "hdmi", "sclk_hdmi", "sclk_pixel",
> -   "sclk_hdmiphy", "hdmiphy";
> +   "sclk_hdmiphy", "mout_hdmi";
> };
>
> mixer {
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/ff56b09d/attachment.html>


[PATCH v2 3/4] gpu: host1x: add runtime pm support for dc

2013-06-13 Thread Thierry Reding
On Thu, Jun 13, 2013 at 03:23:37PM +0530, Mayuresh Kulkarni wrote:
[...]
> diff --git a/drivers/gpu/host1x/drm/dc.c b/drivers/gpu/host1x/drm/dc.c
[...]
> @@ -1128,9 +1129,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
>   return PTR_ERR(dc->clk);
>   }
>  
> - err = clk_prepare_enable(dc->clk);
> - if (err < 0)
> - return err;
> + platform_set_drvdata(pdev, dc);

Why do you move the call to platform_set_drvdata() up here?

Thierry
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/f5c476e6/attachment.pgp>


[PATCH 3/4] ARM: dts: Add mixer clocks to mixer node

2013-06-13 Thread Inki Dae
Acked-by: Inki Dae 

Thanks,
Inki Dae


2013/6/11 Rahul Sharma 

> From: Sean Paul 
>
> This patch adds the mixer clocks to the mixer node in the dts file.
>
> Signed-off-by: Sean Paul 
> Signed-off-by: Rahul Sharma 
> ---
>  arch/arm/boot/dts/exynos5250.dtsi |2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi
> b/arch/arm/boot/dts/exynos5250.dtsi
> index 0673524..9d9496a 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -614,6 +614,8 @@
> compatible = "samsung,exynos5-mixer";
> reg = <0x1445 0x1>;
> interrupts = <0 94 0>;
> +   clocks = < 343>, < 136>;
> +   clock-names = "mixer", "sclk_hdmi";
> };
>
> dp-controller {
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/47877026/attachment.html>


[PATCH 2/4] drm/exynos: add mout_hdmi clock in hdmi driver to change parent

2013-06-13 Thread Inki Dae
Applied.

Thanks,
Inki Dae

> -Original Message-
> From: Rahul Sharma [mailto:rahul.sharma at samsung.com]
> Sent: Tuesday, June 11, 2013 3:54 PM
> To: linux-samsung-soc at vger.kernel.org;
devicetree-discuss at lists.ozlabs.org;
> dri-devel at lists.freedesktop.org
> Cc: kgene.kim at samsung.com; sw0312.kim at samsung.com; inki.dae at 
> samsung.com;
> seanpaul at chromium.org; joshi at samsung.com; r.sh.open at gmail.com; Rahul
> Sharma
> Subject: [PATCH 2/4] drm/exynos: add mout_hdmi clock in hdmi driver to
> change parent
> 
> HDMI driver needs to configure the mout_hdmi mux clock to change
> the parent between sclk_hdmiphy and sclk_pixel.
> 
> Signed-off-by: Rahul Sharma 
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c |   14 ++
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
> b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 5a98194..3b5e215 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -83,6 +83,7 @@ struct hdmi_resources {
>   struct clk  *sclk_pixel;
>   struct clk  *sclk_hdmiphy;
>   struct clk  *hdmiphy;
> + struct clk  *mout_hdmi;
>   struct regulator_bulk_data  *regul_bulk;
>   int regul_count;
>  };
> @@ -1118,7 +1119,7 @@ static void hdmi_v13_mode_apply(struct hdmi_context
> *hdata)
>   }
> 
>   clk_disable_unprepare(hdata->res.sclk_hdmi);
> - clk_set_parent(hdata->res.sclk_hdmi, hdata->res.sclk_hdmiphy);
> + clk_set_parent(hdata->res.mout_hdmi, hdata->res.sclk_hdmiphy);
>   clk_prepare_enable(hdata->res.sclk_hdmi);
> 
>   /* enable HDMI and timing generator */
> @@ -1285,7 +1286,7 @@ static void hdmi_v14_mode_apply(struct hdmi_context
> *hdata)
>   }
> 
>   clk_disable_unprepare(hdata->res.sclk_hdmi);
> - clk_set_parent(hdata->res.sclk_hdmi, hdata->res.sclk_hdmiphy);
> + clk_set_parent(hdata->res.mout_hdmi, hdata->res.sclk_hdmiphy);
>   clk_prepare_enable(hdata->res.sclk_hdmi);
> 
>   /* enable HDMI and timing generator */
> @@ -1311,7 +1312,7 @@ static void hdmiphy_conf_reset(struct hdmi_context
> *hdata)
>   u32 reg;
> 
>   clk_disable_unprepare(hdata->res.sclk_hdmi);
> - clk_set_parent(hdata->res.sclk_hdmi, hdata->res.sclk_pixel);
> + clk_set_parent(hdata->res.mout_hdmi, hdata->res.sclk_pixel);
>   clk_prepare_enable(hdata->res.sclk_hdmi);
> 
>   /* operation mode */
> @@ -1832,8 +1833,13 @@ static int hdmi_resources_init(struct hdmi_context
> *hdata)
>   DRM_ERROR("failed to get clock 'hdmiphy'\n");
>   goto fail;
>   }
> + res->mout_hdmi = devm_clk_get(dev, "mout_hdmi");
> + if (IS_ERR(res->mout_hdmi)) {
> + DRM_ERROR("failed to get clock 'mout_hdmi'\n");
> + goto fail;
> + }
> 
> - clk_set_parent(res->sclk_hdmi, res->sclk_pixel);
> + clk_set_parent(res->mout_hdmi, res->sclk_pixel);
> 
>   res->regul_bulk = devm_kzalloc(dev, ARRAY_SIZE(supply) *
>   sizeof(res->regul_bulk[0]), GFP_KERNEL);
> --
> 1.7.10.4



[PATCH 1/4] drm/exynos: Prepare/Unprepare HDMI subsystem clocks

2013-06-13 Thread Inki Dae
Applied.

Thanks,
Inki Dae

> -Original Message-
> From: Rahul Sharma [mailto:rahul.sharma at samsung.com]
> Sent: Tuesday, June 11, 2013 3:54 PM
> To: linux-samsung-soc at vger.kernel.org;
devicetree-discuss at lists.ozlabs.org;
> dri-devel at lists.freedesktop.org
> Cc: kgene.kim at samsung.com; sw0312.kim at samsung.com; inki.dae at 
> samsung.com;
> seanpaul at chromium.org; joshi at samsung.com; r.sh.open at gmail.com; Rahul
> Sharma
> Subject: [PATCH 1/4] drm/exynos: Prepare/Unprepare HDMI subsystem clocks
> 
> From: Sean Paul 
> 
> Change the clk_enable/clk_disable calls in mixer and hdmi drivers into
> clk_prepare_enable/clk_disable_unprepare, respectively.
> 
> Signed-off-by: Sean Paul 
> Signed-off-by: Rahul Sharma 
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c  |   24 
>  drivers/gpu/drm/exynos/exynos_mixer.c |   12 ++--
>  2 files changed, 18 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
> b/drivers/gpu/drm/exynos/exynos_hdmi.c
> index 04255fe..5a98194 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -1117,9 +1117,9 @@ static void hdmi_v13_mode_apply(struct hdmi_context
> *hdata)
>   hdmi_regs_dump(hdata, "timing apply");
>   }
> 
> - clk_disable(hdata->res.sclk_hdmi);
> + clk_disable_unprepare(hdata->res.sclk_hdmi);
>   clk_set_parent(hdata->res.sclk_hdmi, hdata->res.sclk_hdmiphy);
> - clk_enable(hdata->res.sclk_hdmi);
> + clk_prepare_enable(hdata->res.sclk_hdmi);
> 
>   /* enable HDMI and timing generator */
>   hdmi_reg_writemask(hdata, HDMI_CON_0, ~0, HDMI_EN);
> @@ -1284,9 +1284,9 @@ static void hdmi_v14_mode_apply(struct hdmi_context
> *hdata)
>   hdmi_regs_dump(hdata, "timing apply");
>   }
> 
> - clk_disable(hdata->res.sclk_hdmi);
> + clk_disable_unprepare(hdata->res.sclk_hdmi);
>   clk_set_parent(hdata->res.sclk_hdmi, hdata->res.sclk_hdmiphy);
> - clk_enable(hdata->res.sclk_hdmi);
> + clk_prepare_enable(hdata->res.sclk_hdmi);
> 
>   /* enable HDMI and timing generator */
>   hdmi_reg_writemask(hdata, HDMI_CON_0, ~0, HDMI_EN);
> @@ -1310,9 +1310,9 @@ static void hdmiphy_conf_reset(struct hdmi_context
> *hdata)
>   u8 buffer[2];
>   u32 reg;
> 
> - clk_disable(hdata->res.sclk_hdmi);
> + clk_disable_unprepare(hdata->res.sclk_hdmi);
>   clk_set_parent(hdata->res.sclk_hdmi, hdata->res.sclk_pixel);
> - clk_enable(hdata->res.sclk_hdmi);
> + clk_prepare_enable(hdata->res.sclk_hdmi);
> 
>   /* operation mode */
>   buffer[0] = 0x1f;
> @@ -1701,9 +1701,9 @@ static void hdmi_poweron(struct hdmi_context *hdata)
>   if (regulator_bulk_enable(res->regul_count, res->regul_bulk))
>   DRM_DEBUG_KMS("failed to enable regulator bulk\n");
> 
> - clk_enable(res->hdmiphy);
> - clk_enable(res->hdmi);
> - clk_enable(res->sclk_hdmi);
> + clk_prepare_enable(res->hdmiphy);
> + clk_prepare_enable(res->hdmi);
> + clk_prepare_enable(res->sclk_hdmi);
> 
>   hdmiphy_poweron(hdata);
>  }
> @@ -1726,9 +1726,9 @@ static void hdmi_poweroff(struct hdmi_context
*hdata)
>   hdmiphy_conf_reset(hdata);
>   hdmiphy_poweroff(hdata);
> 
> - clk_disable(res->sclk_hdmi);
> - clk_disable(res->hdmi);
> - clk_disable(res->hdmiphy);
> + clk_disable_unprepare(res->sclk_hdmi);
> + clk_disable_unprepare(res->hdmi);
> + clk_disable_unprepare(res->hdmiphy);
>   regulator_bulk_disable(res->regul_count, res->regul_bulk);
> 
>   mutex_lock(>hdmi_mutex);
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c
> b/drivers/gpu/drm/exynos/exynos_mixer.c
> index b0882b3..978894e 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -900,10 +900,10 @@ static void mixer_poweron(struct mixer_context *ctx)
>   ctx->powered = true;
>   mutex_unlock(>mixer_mutex);
> 
> - clk_enable(res->mixer);
> + clk_prepare_enable(res->mixer);
>   if (ctx->vp_enabled) {
> - clk_enable(res->vp);
> - clk_enable(res->sclk_mixer);
> + clk_prepare_enable(res->vp);
> + clk_prepare_enable(res->sclk_mixer);
>   }
> 
>   mixer_reg_write(res, MXR_INT_EN, ctx->int_en);
> @@ -927,10 +927,10 @@ static void mixer_poweroff(struct mixer_context
*ctx)
> 
>   ctx->int_en = mixer_reg_read(res, MXR_INT_EN);
> 
> - clk_disable(res->mixer);
> + clk_disable_unprepare(res->mixer);
>   if (ctx->vp_enabled) {
> - clk_disable(res->vp);
> - clk_disable(res->sclk_mixer);
> + clk_disable_unprepare(res->vp);
> + clk_disable_unprepare(res->sclk_mixer);
>   }
> 
>   mutex_lock(>mixer_mutex);
> --
> 1.7.10.4



[Bug 65730] no sound via HDMI for Radeon 6850 mesa driver

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65730

--- Comment #1 from Alex Deucher  ---
You need to boot with radeon.audio=1 on the kernel command line in grub to
enable audio.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/89777ca2/attachment.html>


[RFC PATCH] dmabuf-sync: Introduce buffer synchronization framework

2013-06-13 Thread Inki Dae

> +static void dmabuf_sync_timeout_worker(struct work_struct *work)
> +{
> + struct dmabuf_sync *sync = container_of(work, struct dmabuf_sync,
> work);
> + struct dmabuf_sync_object *sobj;
> +
> + mutex_lock(>lock);
> +
> + list_for_each_entry(sobj, >syncs, head) {
> + if (WARN_ON(!sobj->robj))
> + continue;
> +
> + printk(KERN_WARNING "%s: timeout = 0x%x [type = %d, " \
> + "refcnt = %d, locked = %d]\n",
> + sync->name, (u32)sobj->dmabuf,
> + sobj->access_type,
> +
atomic_read(>robj->shared_cnt),
> + sobj->robj->locked);
> +
> + /* unlock only valid sync object. */
> + if (!sobj->robj->locked)
> + continue;
> +
> + if (sobj->robj->shared &&
> + atomic_read(>robj->shared_cnt) > 1) {
> + atomic_dec(>robj->shared_cnt);
> + continue;
> + }
> +
> + ww_mutex_unlock(>robj->lock);
> +
> + if (sobj->access_type & DMA_BUF_ACCESS_READ)
> + printk(KERN_WARNING "%s: r-unlocked = 0x%x\n",
> + sync->name, (u32)sobj->dmabuf);
> + else
> + printk(KERN_WARNING "%s: w-unlocked = 0x%x\n",
> + sync->name, (u32)sobj->dmabuf);
> +
> +#if defined(CONFIG_DEBUG_FS)
> + sync_debugfs_timeout_cnt++;
> +#endif

Oops, unnecessary codes. will remove them.



[RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with pmu reg control

2013-06-13 Thread Inki Dae


> -Original Message-
> From: Sylwester Nawrocki [mailto:s.nawrocki at samsung.com]
> Sent: Thursday, June 13, 2013 5:56 PM
> To: Rahul Sharma
> Cc: Rahul Sharma; Inki Dae; linux-samsung-soc at vger.kernel.org; devicetree-
> discuss at lists.ozlabs.org; DRI mailing list; Kukjin Kim; Seung-Woo Kim;
> Sean Paul; sunil joshi; Kishon Vijay Abraham I; Stephen Warren;
> grant.likely at linaro.org
> Subject: Re: [RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with
> pmu reg control
> 
> Hi,
> 
> On 06/13/2013 06:26 AM, Rahul Sharma wrote:
> > Mr. Dae,
> >
> > Thanks for your valuable inputs.
> >
> > I posted it as RFC because, I also have received comments to register
> > hdmiphy as a clock controller. As we always configure it for specific
> > frequency, hdmi-phy looks similar to a PLL. But it really doesn't
> > belong to that class. Secondly prior to exynos5420, it was a i2c
> > device. I am not sure we can register a I2C device as a clock
> > controller. I wanted to discuss and explore this option here.
> 
> Have you considered using the generic PHY framework for those HDMI
> PHY devices [1] ? I guess we could add a dedicated group of ops for
> video PHYs, similarly as is is done with struct v4l2_subdev_ops. For
> configuring things like the carrier/pixel clock frequency or anything
> what's common across the video PHYs.
> 
> Perhaps you could have a look and see if this framework would be
> useful for HDMI and possibly point out anything what might be missing ?
> 
> I'm not sure it it really solves the issues specific to the Exynos
> HDMI but at least with a generic PHY driver the PHY module would be
> separate from the PHY controller, as often same HDMI DPHY can be used
> with various types of a HDMI controller. So this would allow to not
> duplicate the HDMI PHY drivers in the long-term perspective.

Yeah, at least, it seems that we could use PHY module to control PMU
register, HDMI_PHY_CONTROL. However, PHY module provides only init/on/off
callbacks. As you may know, HDMIPHY needs i2c interfaces to control HDMIPHY
clock. So with PHY module, HDMIPHY driver could enable PMU more generically,
but also has to use existing i2c stuff to control HDMIPHY clock. I had a
quick review to Generic PHY Framework[v6] but I didn't see that the PHY
module could generically support more features such as i2c stuff.

Thanks,
Inki Dae

> 
> [1] https://lkml.org/lkml/2013/4/29/95
> 
> Thanks,
> Sylwester
> 
> > As you said, in parallel, I will align these changes and along with
> > "drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver"
> > series and post them.
> >
> > I hope we should be able to close on one of the above approaches for
> > hdmiphy.
> >
> > regards,
> > Rahul Sharma.
> >
> > On Wed, Jun 12, 2013 at 9:57 AM, Inki Dae  wrote:
> >>
> >> 2013/6/12 Inki Dae 
> >>>
> >>> Hi Rahul,
> >>>
> >>> This patch is important to us. Actually, previous hdmi driver had
> >>> controlled hdmiphy HDMI_PHY_CONTROL as if that were a clock but now
> that
> >>> doesn't exist anymore. So we need to discuss how hdmiphy should be
> handled.
> >>> I konw that you had already posted hdmiphy relevant patch set, [PATCH
> 0/4]
> >>> drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver.
> >>>
> >>> I think we can couple pmu register controlling codes with that patch
> set
> >>> without RFC. Could you update and post them again? like below,
> >>> [PATCH 0/4] drm/exynos: hdmi: move hdmiphy related code to hdmiphy
> driver
> >>> + [RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with pmu reg
> >>> control
> >>>
> >>> And then let's start review :)
> >>
> >> And I think It would be better to move the pmu register controlling
> codes
> >> into hdmiphy driver like drivers/usb/phy/phy-samsung-usb2.c driver
does.
> >>>
> >>> Thanks,
> >>> Inki Dae
> >>>
> >>> 2013/6/11 Rahul Sharma 
> 
>  Previously, hdmiphy is added as a dummy clock in clock file for
>  exynos SoCs. Enable/Disable to this clock, actually toggles the power
>  control bit in PMU, instead of controlling the clock gate.
> 
>  This RFC adds the support to parse hdmiphy control node which is a
> child
>  node to hdmi, and map the pmu register to toggle the power control
> bit.
> 
>  This is based on drm-next branch in Inki Dae's tree.
> 
>  Rahul Sharma (2):
>    drm/exynos: replace dummy hdmiphy clock with pmu register control
>    ARM/dts: add hdmiphy power control pmu register to hdmi dt node
> 
>   arch/arm/boot/dts/exynos5250.dtsi|6 +++
>   drivers/gpu/drm/exynos/exynos_hdmi.c |   69
>  ++
>   drivers/gpu/drm/exynos/regs-hdmi.h   |4 ++
>   3 files changed, 71 insertions(+), 8 deletions(-)
> 
>  --
>  1.7.10.4
> 
> --
> Sylwester Nawrocki
> Samsung R Institute Poland
> Samsung Electronics



[Bug 65730] New: no sound via HDMI for Radeon 6850 mesa driver

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65730

  Priority: medium
Bug ID: 65730
  Assignee: dri-devel at lists.freedesktop.org
   Summary: no sound via HDMI for Radeon 6850 mesa driver
  Severity: normal
Classification: Unclassified
OS: Linux (All)
  Reporter: jasontheparamedic at hotmail.com
  Hardware: x86-64 (AMD64)
Status: NEW
   Version: unspecified
 Component: Drivers/DRI/R600
   Product: Mesa

Greetings, this is my first bug report so I apologize if it is placed in the
wrong section.  I am unable to get sound via HDMI cable using the open source
driver for my Radeon 6850.  I have (X)ubuntu 13.04 32bit system, using mesa
9.2, as provided by the xorg-edgers ppa, using all appropriate updates as
passed downstream by the ppa.  Using the FGLRX driver does fix the sound issue
along with providing a high level of hardware acceleration, but it does cripple
me being able to play on some emulators due to the well-known buggy nature of
the FGLRX driver.  I already made a report on the askubuntu.com forums, but so
far there has been no response.  My motherboard's native sound card is broken,
so currently I have my computer speakers plugged into the HD monitor, hence
HDMI sound is my only choice at this time.  Here is a link to my askubuntu
question (so as to avoid duplication of effort with providing info).

http://askubuntu.com/questions/306196/no-sound-via-hdmi-using-xubuntu-13-04-32-bit-amd-mesa-9-2

Thanks in advance for any assistance.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/c0eb837f/attachment.html>


[pull] radeon drm-fixes-3.10

2013-06-13 Thread alexdeuc...@gmail.com
From: Alex Deucher 

Hi Dave,

  Just two small fixes from Jerome.  Remove some harmless but confusing
VM related error messages and fix a regression with suspend and UVD.

The following changes since commit df63d3ecbca514bad99513b2401448d19a9bb92e:

  Merge tag 'drm-intel-fixes-2013-06-11' of 
git://people.freedesktop.org/~danvet/drm-intel into drm-fixes (2013-06-11 
19:38:27 +1000)

are available in the git repository at:

  git://people.freedesktop.org/~agd5f/linux drm-fixes-3.10

Jerome Glisse (2):
  drm/radeon: do not try to uselessly update virtual memory pagetable
  drm/radeon: fix write back suspend regression with uvd v2

 drivers/gpu/drm/radeon/radeon_device.c |   53 ++-
 drivers/gpu/drm/radeon/radeon_fence.c  |   10 +-
 drivers/gpu/drm/radeon/radeon_gart.c   |6 ++-
 drivers/gpu/drm/radeon/radeon_uvd.c|   14 
 4 files changed, 50 insertions(+), 33 deletions(-)


[RFC PATCH] dmabuf-sync: Introduce buffer synchronization framework

2013-06-13 Thread Russell King - ARM Linux
On Thu, Jun 13, 2013 at 05:28:08PM +0900, Inki Dae wrote:
> This patch adds a buffer synchronization framework based on DMA BUF[1]
> and reservation[2] to use dma-buf resource, and based on ww-mutexes[3]
> for lock mechanism.
> 
> The purpose of this framework is not only to couple cache operations,
> and buffer access control to CPU and DMA but also to provide easy-to-use
> interfaces for device drivers and potentially user application
> (not implemented for user applications, yet). And this framework can be
> used for all dma devices using system memory as dma buffer, especially
> for most ARM based SoCs.
> 
> The mechanism of this framework has the following steps,
> 1. Register dmabufs to a sync object - A task gets a new sync object and
> can add one or more dmabufs that the task wants to access.
> This registering should be performed when a device context or an event
> context such as a page flip event is created or before CPU accesses a 
> shared
> buffer.
> 
>   dma_buf_sync_get(a sync object, a dmabuf);
> 
> 2. Lock a sync object - A task tries to lock all dmabufs added in its own
> sync object. Basically, the lock mechanism uses ww-mutex[1] to avoid dead
> lock issue and for race condition between CPU and CPU, CPU and DMA, and 
> DMA
> and DMA. Taking a lock means that others cannot access all locked dmabufs
> until the task that locked the corresponding dmabufs, unlocks all the 
> locked
> dmabufs.
> This locking should be performed before DMA or CPU accesses these dmabufs.
> 
>   dma_buf_sync_lock(a sync object);
> 
> 3. Unlock a sync object - The task unlocks all dmabufs added in its own 
> sync
> object. The unlock means that the DMA or CPU accesses to the dmabufs have
> been completed so that others may access them.
> This unlocking should be performed after DMA or CPU has completed accesses
> to the dmabufs.
> 
>   dma_buf_sync_unlock(a sync object);
> 
> 4. Unregister one or all dmabufs from a sync object - A task unregisters
> the given dmabufs from the sync object. This means that the task dosen't
> want to lock the dmabufs.
> The unregistering should be performed after DMA or CPU has completed
> accesses to the dmabufs or when dma_buf_sync_lock() is failed.
> 
>   dma_buf_sync_put(a sync object, a dmabuf);
>   dma_buf_sync_put_all(a sync object);
> 
> The described steps may be summarized as:
>   get -> lock -> CPU or DMA access to a buffer/s -> unlock -> put
> 
> This framework includes the following two features.
> 1. read (shared) and write (exclusive) locks - A task is required to 
> declare
> the access type when the task tries to register a dmabuf;
> READ, WRITE, READ DMA, or WRITE DMA.
> 
> The below is example codes,
>   struct dmabuf_sync *sync;
> 
>   sync = dmabuf_sync_init(NULL, "test sync");
> 
>   dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_READ);
>   ...
> 
>   And the below can be used as access types:
>   DMA_BUF_ACCESS_READ,
>   - CPU will access a buffer for read.
>   DMA_BUF_ACCESS_WRITE,
>   - CPU will access a buffer for read or write.
>   DMA_BUF_ACCESS_READ | DMA_BUF_ACCESS_DMA,
>   - DMA will access a buffer for read
>   DMA_BUF_ACCESS_WRITE | DMA_BUF_ACCESS_DMA,
>   - DMA will access a buffer for read or write.
> 
> 2. Mandatory resource releasing - a task cannot hold a lock indefinitely.
> A task may never try to unlock a buffer after taking a lock to the buffer.
> In this case, a timer handler to the corresponding sync object is called
> in five (default) seconds and then the timed-out buffer is unlocked by 
> work
> queue handler to avoid lockups and to enforce resources of the buffer.
> 
> The below is how to use:
>   1. Allocate and Initialize a sync object:
>   struct dmabuf_sync *sync;
> 
>   sync = dmabuf_sync_init(NULL, "test sync");
>   ...
> 
>   2. Add a dmabuf to the sync object when setting up dma buffer relevant
>  registers:
>   dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_READ);
>   ...
> 
>   3. Lock all dmabufs of the sync object before DMA or CPU accesses
>  the dmabufs:
>   dmabuf_sync_lock(sync);
>   ...
> 
>   4. Now CPU or DMA can access all dmabufs locked in step 3.
> 
>   5. Unlock all dmabufs added in a sync object after DMA or CPU access
>  to these dmabufs is completed:
>   dmabuf_sync_unlock(sync);
> 
>  And call the following functions to release all resources,
>   dmabuf_sync_put_all(sync);
>   dmabuf_sync_fini(sync);
> 
>   You can refer to actual example codes:
>   
> https://git.kernel.org/cgit/linux/kernel/git/daeinki/drm-exynos.git/
>   
> 

[RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with pmu reg control

2013-06-13 Thread Kishon Vijay Abraham I
Hi,

On Thursday 13 June 2013 04:51 PM, Inki Dae wrote:
>
>
>> -Original Message-
>> From: Sylwester Nawrocki [mailto:s.nawrocki at samsung.com]
>> Sent: Thursday, June 13, 2013 5:56 PM
>> To: Rahul Sharma
>> Cc: Rahul Sharma; Inki Dae; linux-samsung-soc at vger.kernel.org; devicetree-
>> discuss at lists.ozlabs.org; DRI mailing list; Kukjin Kim; Seung-Woo Kim;
>> Sean Paul; sunil joshi; Kishon Vijay Abraham I; Stephen Warren;
>> grant.likely at linaro.org
>> Subject: Re: [RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with
>> pmu reg control
>>
>> Hi,
>>
>> On 06/13/2013 06:26 AM, Rahul Sharma wrote:
>>> Mr. Dae,
>>>
>>> Thanks for your valuable inputs.
>>>
>>> I posted it as RFC because, I also have received comments to register
>>> hdmiphy as a clock controller. As we always configure it for specific
>>> frequency, hdmi-phy looks similar to a PLL. But it really doesn't
>>> belong to that class. Secondly prior to exynos5420, it was a i2c
>>> device. I am not sure we can register a I2C device as a clock
>>> controller. I wanted to discuss and explore this option here.
>>
>> Have you considered using the generic PHY framework for those HDMI
>> PHY devices [1] ? I guess we could add a dedicated group of ops for
>> video PHYs, similarly as is is done with struct v4l2_subdev_ops. For
>> configuring things like the carrier/pixel clock frequency or anything
>> what's common across the video PHYs.
>>
>> Perhaps you could have a look and see if this framework would be
>> useful for HDMI and possibly point out anything what might be missing ?
>>
>> I'm not sure it it really solves the issues specific to the Exynos
>> HDMI but at least with a generic PHY driver the PHY module would be
>> separate from the PHY controller, as often same HDMI DPHY can be used
>> with various types of a HDMI controller. So this would allow to not
>> duplicate the HDMI PHY drivers in the long-term perspective.
>
> Yeah, at least, it seems that we could use PHY module to control PMU
> register, HDMI_PHY_CONTROL. However, PHY module provides only init/on/off
> callbacks. As you may know, HDMIPHY needs i2c interfaces to control HDMIPHY
> clock. So with PHY module, HDMIPHY driver could enable PMU more generically,
> but also has to use existing i2c stuff to control HDMIPHY clock. I had a
> quick review to Generic PHY Framework[v6] but I didn't see that the PHY
> module could generically support more features such as i2c stuff.

I don't think PHY framework needs to provide i2c interfaces to program 
certain configurations. Instead in one of the callbacks (init/on/off) 
PHY driver can program whatever it wants using any of the interfaces it 
needs. IMO PHY framework should work independent of the interfaces.

For example, twl4030 phy driver actually uses i2c to program its 
registers but still it uses the PHY framework [1].

[1] --> http://www.gossamer-threads.com/lists/linux/kernel/1729414

Thanks
Kishon


[Bug 59681] Sony VAIO VPCZ23A4R: radeon doesn't like undocking

2013-06-13 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=59681


Alex Deucher  changed:

   What|Removed |Added

 CC||alexdeucher at gmail.com




--- Comment #1 from Alex Deucher   2013-06-13 
18:21:31 ---
Kernel PCI GPU hotplug is not supported yet either.  You've basically removed
hardware from under an active driver.  You'll need to unload the radeon module
first.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.


[Bug 59681] New: Sony VAIO VPCZ23A4R: radeon doesn't like undocking

2013-06-13 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=59681

   Summary: Sony VAIO VPCZ23A4R: radeon doesn't like undocking
   Product: Drivers
   Version: 2.5
Kernel Version: 3.10-rc5
  Platform: All
OS/Version: Linux
  Tree: Mainline
Status: NEW
  Severity: normal
  Priority: P1
 Component: Video(DRI - non Intel)
AssignedTo: drivers_video-dri at kernel-bugs.osdl.org
ReportedBy: patrakov at gmail.com
Regression: No


Created an attachment (id=104661)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=104661)
The end of the dmesg

I have a Sony VAIO VPCZ23A4R laptop. It has a dock station with several devices
in it:

# lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family
DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core
Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series
Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family
USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family
High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI
Express Root Port 1 (rev b4)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI
Express Root Port 2 (rev b4)
00:1c.2 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI
Express Root Port 3 (rev b4)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI
Express Root Port 4 (rev b4)
00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI
Express Root Port 7 (rev b4)
00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family
USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM67 Express Chipset Family LPC
Controller (rev 04)
00:1f.2 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller
[RAID mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus
Controller (rev 04)
02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6230 [Rainbow
Peak] (rev 34)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5209 PCI
Express Card Reader (rev 01)
04:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev
04)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI
Express Gigabit Ethernet controller (rev 06)
08:00.0 PCI bridge: Intel Corporation Device 151b (rev 01)
0a:00.0 PCI bridge: Intel Corporation Device 151b (rev 01)
0a:03.0 PCI bridge: Intel Corporation Device 151b (rev 01)
0a:04.0 PCI bridge: Intel Corporation Device 151b (rev 01)
14:00.0 PCI bridge: Intel Corporation Device 151b (rev 01)
15:03.0 PCI bridge: Intel Corporation Device 151b (rev 01)
15:04.0 PCI bridge: Intel Corporation Device 151b (rev 01)
16:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Whistler [Radeon HD 6730M/6770M/7690M XT]
16:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Turks/Whistler
HDMI Audio [Radeon HD 6000 Series]
17:00.0 PCI bridge: Intel Corporation Device 151b (rev 01)
18:00.0 PCI bridge: Intel Corporation Device 151b (rev 01)
18:01.0 PCI bridge: Intel Corporation Device 151b (rev 01)
18:02.0 PCI bridge: Intel Corporation Device 151b (rev 01)
18:03.0 PCI bridge: Intel Corporation Device 151b (rev 01)
18:04.0 PCI bridge: Intel Corporation Device 151b (rev 01)
19:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI
Express Gigabit Ethernet controller (rev 06)
1a:00.0 IDE interface: Marvell Technology Group Ltd. 88SE6121 SATA II / PATA
Controller (rev b2)
1b:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev
04)
aep-vaio ~ # lspci -n
00:00.0 0600: 8086:0104 (rev 09)
00:02.0 0300: 8086:0126 (rev 09)
00:16.0 0780: 8086:1c3a (rev 04)
00:1a.0 0c03: 8086:1c2d (rev 04)
00:1b.0 0403: 8086:1c20 (rev 04)
00:1c.0 0604: 8086:1c10 (rev b4)
00:1c.1 0604: 8086:1c12 (rev b4)
00:1c.2 0604: 8086:1c14 (rev b4)
00:1c.3 0604: 8086:1c16 (rev b4)
00:1c.6 0604: 8086:1c1c (rev b4)
00:1d.0 0c03: 8086:1c26 (rev 04)
00:1f.0 0601: 8086:1c4b (rev 04)
00:1f.2 0104: 8086:282a (rev 04)
00:1f.3 0c05: 8086:1c22 (rev 04)
02:00.0 0280: 8086:0091 (rev 34)
03:00.0 ff00: 10ec:5209 (rev 01)
04:00.0 0c03: 1033:0194 (rev 04)
05:00.0 0200: 10ec:8168 (rev 06)
08:00.0 0604: 8086:151b (rev 01)
0a:00.0 0604: 8086:151b (rev 01)
0a:03.0 0604: 8086:151b (rev 01)
0a:04.0 0604: 8086:151b (rev 01)
14:00.0 0604: 8086:151b (rev 01)
15:03.0 0604: 8086:151b (rev 01)
15:04.0 0604: 8086:151b (rev 01)
16:00.0 0300: 1002:6740
16:00.1 0403: 1002:aa90
17:00.0 0604: 8086:151b (rev 01)
18:00.0 0604: 8086:151b (rev 01)
18:01.0 0604: 8086:151b (rev 01)
18:02.0 0604: 8086:151b (rev 01)
18:03.0 

[Bug 65722] Before update dual display wasn't an option. Since update I have to have amp and tv on or else monitor display goes funny and cannot be used.

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65722

Alex Deucher  changed:

   What|Removed |Added

Product|Mesa|DRI
  Component|Drivers/Gallium/radeonsi|DRM/Radeon

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/5e3c3c0e/attachment.html>


[Bug 65722] Before update dual display wasn't an option. Since update I have to have amp and tv on or else monitor display goes funny and cannot be used.

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65722

--- Comment #2 from Alex Deucher  ---
Please attach your xorg log and dmesg output.  Also, what are you trying to
accomplish?  Dualhead?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/7c1a4c05/attachment.html>


[Bug 65723] Xonotic glsl 1.30 broken

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65723

--- Comment #3 from Rafael Castillo  ---
i can but they are clean of errors, even running xonotic from console its clean
which is why i made an apitrace.

ill post them later today when get home anyway

thx for your time

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/2577dde3/attachment.html>


[Bug 65723] Xonotic glsl 1.30 broken

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65723

--- Comment #2 from Alex Deucher  ---
Please attach your xorg log and dmesg output.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/d5315b55/attachment-0001.html>


[RFC PATCH] dmabuf-sync: Introduce buffer synchronization framework

2013-06-13 Thread Inki Dae
This patch adds a buffer synchronization framework based on DMA BUF[1]
and reservation[2] to use dma-buf resource, and based on ww-mutexes[3]
for lock mechanism.

The purpose of this framework is not only to couple cache operations,
and buffer access control to CPU and DMA but also to provide easy-to-use
interfaces for device drivers and potentially user application
(not implemented for user applications, yet). And this framework can be
used for all dma devices using system memory as dma buffer, especially
for most ARM based SoCs.

The mechanism of this framework has the following steps,
1. Register dmabufs to a sync object - A task gets a new sync object and
can add one or more dmabufs that the task wants to access.
This registering should be performed when a device context or an event
context such as a page flip event is created or before CPU accesses a shared
buffer.

dma_buf_sync_get(a sync object, a dmabuf);

2. Lock a sync object - A task tries to lock all dmabufs added in its own
sync object. Basically, the lock mechanism uses ww-mutex[1] to avoid dead
lock issue and for race condition between CPU and CPU, CPU and DMA, and DMA
and DMA. Taking a lock means that others cannot access all locked dmabufs
until the task that locked the corresponding dmabufs, unlocks all the locked
dmabufs.
This locking should be performed before DMA or CPU accesses these dmabufs.

dma_buf_sync_lock(a sync object);

3. Unlock a sync object - The task unlocks all dmabufs added in its own sync
object. The unlock means that the DMA or CPU accesses to the dmabufs have
been completed so that others may access them.
This unlocking should be performed after DMA or CPU has completed accesses
to the dmabufs.

dma_buf_sync_unlock(a sync object);

4. Unregister one or all dmabufs from a sync object - A task unregisters
the given dmabufs from the sync object. This means that the task dosen't
want to lock the dmabufs.
The unregistering should be performed after DMA or CPU has completed
accesses to the dmabufs or when dma_buf_sync_lock() is failed.

dma_buf_sync_put(a sync object, a dmabuf);
dma_buf_sync_put_all(a sync object);

The described steps may be summarized as:
get -> lock -> CPU or DMA access to a buffer/s -> unlock -> put

This framework includes the following two features.
1. read (shared) and write (exclusive) locks - A task is required to declare
the access type when the task tries to register a dmabuf;
READ, WRITE, READ DMA, or WRITE DMA.

The below is example codes,
struct dmabuf_sync *sync;

sync = dmabuf_sync_init(NULL, "test sync");

dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_READ);
...

And the below can be used as access types:
DMA_BUF_ACCESS_READ,
- CPU will access a buffer for read.
DMA_BUF_ACCESS_WRITE,
- CPU will access a buffer for read or write.
DMA_BUF_ACCESS_READ | DMA_BUF_ACCESS_DMA,
- DMA will access a buffer for read
DMA_BUF_ACCESS_WRITE | DMA_BUF_ACCESS_DMA,
- DMA will access a buffer for read or write.

2. Mandatory resource releasing - a task cannot hold a lock indefinitely.
A task may never try to unlock a buffer after taking a lock to the buffer.
In this case, a timer handler to the corresponding sync object is called
in five (default) seconds and then the timed-out buffer is unlocked by work
queue handler to avoid lockups and to enforce resources of the buffer.

The below is how to use:
1. Allocate and Initialize a sync object:
struct dmabuf_sync *sync;

sync = dmabuf_sync_init(NULL, "test sync");
...

2. Add a dmabuf to the sync object when setting up dma buffer relevant
   registers:
dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_READ);
...

3. Lock all dmabufs of the sync object before DMA or CPU accesses
   the dmabufs:
dmabuf_sync_lock(sync);
...

4. Now CPU or DMA can access all dmabufs locked in step 3.

5. Unlock all dmabufs added in a sync object after DMA or CPU access
   to these dmabufs is completed:
dmabuf_sync_unlock(sync);

   And call the following functions to release all resources,
dmabuf_sync_put_all(sync);
dmabuf_sync_fini(sync);

You can refer to actual example codes:

https://git.kernel.org/cgit/linux/kernel/git/daeinki/drm-exynos.git/

commit/?h=dmabuf-sync=4030bdee9bab5841ad32faade528d04cc0c5fc94


https://git.kernel.org/cgit/linux/kernel/git/daeinki/drm-exynos.git/

commit/?h=dmabuf-sync=6ca548e9ea9e865592719ef6b1cde58366af9f5c

The 

[Bug 65723] Xonotic glsl 1.30 broken

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65723

--- Comment #1 from Rafael Castillo  ---
i mean glsl 1.30 was enable by default

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/5c326bb6/attachment.html>


[Bug 65723] Xonotic glsl 1.30 broken

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65723

Rafael Castillo  changed:

   What|Removed |Added

   Priority|medium  |highest

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/2cd43729/attachment.html>


[Bug 65723] New: Xonotic glsl 1.30 broken

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65723

  Priority: medium
Bug ID: 65723
  Assignee: dri-devel at lists.freedesktop.org
   Summary: Xonotic glsl 1.30 broken
  Severity: blocker
Classification: Unclassified
OS: Linux (All)
  Reporter: jrch2k10 at gmail.com
  Hardware: x86-64 (AMD64)
Status: NEW
   Version: git
 Component: Drivers/Gallium/radeonsi
   Product: Mesa

since glsl was enable by default xonotic 0.6 have heavy render issues 

my entire stack is git and my card is an 7770.

you can download from here the entire apitrace file[apitrace 3.0]

https://docs.google.com/uc?export=download=2qiw=0B29SlCylOCovb2NpVTQ4LVdyZW8

thanks in advance

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/50a356ab/attachment.html>


[Bug 51381] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting, when disabled via vgaswitcheroo

2013-06-13 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=51381





--- Comment #7 from Alex Deucher   2013-06-13 
17:11:40 ---
See comment #1.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #63 from Andy Furniss  ---
(In reply to comment #61)
> (In reply to comment #58)
> > Has anyone tested the patch from comment 47?
> 
> Oops almost missed that - It does fix heaven and pearl boy on my rv790.

Aggh ignore that it doesn't fix it - I applied the wrong patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/75684507/attachment.html>


[Bug 51381] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting, when disabled via vgaswitcheroo

2013-06-13 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=51381


Christoph Haag  changed:

   What|Removed |Added

 CC||haagch.christoph at googlemail
   ||.com




--- Comment #6 from Christoph Haag   
2013-06-13 17:10:13 ---
intel + radeon + vgaswitcheroo seems to have been problematic for quite some
time:
https://bugzilla.kernel.org/show_bug.cgi?id=23592

I'm using 3.10rc5.

While I have no problems with suspending or quitting X (didn't have problems
with some earlier kernels either), I have had yet another problem for some time
now. If I

start X with the radeon card enabled
then disable the radeon card with vgaswitcheroo
then switch to a tty
then switch back to X

then X hangs and I get many messages like
[  236.688466] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than
5secs aborting
[  236.688470] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing
D46E (len 62, WS 0, PS 0) @ 0xD48A

I assume the problem is still the same.

The most pressing issue is that X should not get stuck, no matter what. It's
much better to reset the driver somehow, even if you lose 3d acceleration or
so. As it is now, X eats all keyboard input and you have to use sysrq keys or
reboot over ssh which is not really ideal.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.


[Bug 65722] Before update dual display wasn't an option. Since update I have to have amp and tv on or else monitor display goes funny and cannot be used.

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65722

--- Comment #1 from Paul Sherwood  ---
When amp and tv are on, the POST screen shows up on both screens, then login
only shows on tv. Once Mint loads the display switches to the monitor and the
tv goes black again. 
On the display settings the tv is set to be off and monitor on.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/13b2075f/attachment.html>


[Bug 65722] New: Before update dual display wasn't an option. Since update I have to have amp and tv on or else monitor display goes funny and cannot be used.

2013-06-13 Thread bugzilla-dae...@freedesktop.org
db0-fdbf PCI Bus :04
fdc0-fdcf PCI Bus :04
fdcf8000-fdcf Etron Technology, Inc. EJ168 USB 3.0 Host Controller (rev
01) (prog-if 30 [XHCI])
fdcf8000-fdcf xhci_hcd
fdd0-fddf PCI Bus :03
fddf8000-fddfbfff Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express
Gigabit Ethernet controller (rev 06)
fddf8000-fddfbfff RealTek RTL-8169 Gigabit Ethernet driver
fddff000-fddf Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express
Gigabit Ethernet controller (rev 06)
fddff000-fddf RealTek RTL-8169 Gigabit Ethernet driver
fde0-fdef PCI Bus :03
fdf0-fdff PCI Bus :02
fe024000-fe027fff Advanced Micro Devices [AMD] nee ATI SBx00 Azalia (Intel
HDA)
fe024000-fe027fff ICH HD audio
fe028000-fe028fff Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0
USB OHCI2 Controller (prog-if 10 [OHCI])
fe028000-fe028fff ohci_hcd
fe029000-fe0290ff Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0
USB EHCI Controller (prog-if 20 [EHCI])
fe029000-fe0290ff ehci_hcd
fe02a000-fe02afff Advanced Micro Devices [AMD] nee ATI SB7x0 USB OHCI1
Controller (prog-if 10 [OHCI])
fe02a000-fe02afff ohci_hcd
fe02b000-fe02bfff Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0
USB OHCI0 Controller (prog-if 10 [OHCI])
fe02b000-fe02bfff ohci_hcd
fe02c000-fe02c0ff Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0
USB EHCI Controller (prog-if 20 [EHCI])
fe02c000-fe02c0ff ehci_hcd
fe02d000-fe02dfff Advanced Micro Devices [AMD] nee ATI SB7x0 USB OHCI1
Controller (prog-if 10 [OHCI])
fe02d000-fe02dfff ohci_hcd
fe02e000-fe02efff Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0
USB OHCI0 Controller (prog-if 10 [OHCI])
fe02e000-fe02efff ohci_hcd
fe02f000-fe02f3ff Advanced Micro Devices [AMD] nee ATI SB7x0/SB8x0/SB9x0
SATA Controller [IDE mode] (prog-if 01 [AHCI 1.0])
fe02f000-fe02f3ff AHCI SATA low-level driver
fec0- reserved
fec0-fec003ff IOAPIC 0
fed0-fed003ff HPET 0
fee0-fee00fff Local APIC
fee00400-fee00fff pnp 00:02
fff8-fffe pnp 00:0c
- pnp 00:0c
1-22eff System RAM
22f00-22fff RAM buffer
DMA
2floppy
4cascade

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/0c82a526/attachment-0001.html>


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #62 from Andy Furniss  ---
(In reply to comment #60)
> Created attachment 80781 [details] [review]
> Properly set COUNT_3 v2
> 
> Sorry I sent the wrong patch.

This one also fixes heaven and pearl boy on rv790.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/d76b4706/attachment-0001.html>


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #61 from Andy Furniss  ---
(In reply to comment #58)
> Has anyone tested the patch from comment 47?

Oops almost missed that - It does fix heaven and pearl boy on my rv790.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/eb2d8896/attachment.html>


[PATCH] drm/edid: Don't print messages regarding stereo or csync by default

2013-06-13 Thread Adam Jackson
On Thu, 2013-06-13 at 21:01 +0200, Egbert Eich wrote:
> drm_mode_detailed() is called quite often, therefore when a monitor
> that has a detailed timing mode marked DRM_EDID_PT_STEREO or requiring
> composite sync, warning messages will clutter up the kernel log.
> Like we already do for incorrect hsync/vsync pluse widths, print these
> messages only when KMS debugging is enabled.

Oof, yes, a thousand times yes, how were we still doing this.

Reviewed-by: Adam Jackson 

- ajax
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/f3920b1e/attachment.pgp>


[PATCH v2 4/4] gpu: host1x: add runtime pm support for host1x

2013-06-13 Thread Mayuresh Kulkarni
Signed-off-by: Mayuresh Kulkarni 
---
 drivers/gpu/host1x/dev.c | 57 
 1 file changed, 57 insertions(+)

diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 28e28a2..b43eb29 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 

 #define CREATE_TRACE_POINTS
 #include 
@@ -143,11 +144,16 @@ static int host1x_probe(struct platform_device *pdev)
return err;
}

+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_enable(>dev);
+   pm_runtime_get_sync(>dev);
+#else
err = clk_prepare_enable(host->clk);
if (err < 0) {
dev_err(>dev, "failed to enable clock\n");
return err;
}
+#endif

err = host1x_syncpt_init(host);
if (err) {
@@ -165,10 +171,17 @@ static int host1x_probe(struct platform_device *pdev)

host1x_drm_alloc(pdev);

+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_put(>dev);
+#endif
+
return 0;

 fail_deinit_syncpt:
host1x_syncpt_deinit(host);
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_put(>dev);
+#endif
return err;
 }

@@ -179,10 +192,51 @@ static int __exit host1x_remove(struct platform_device 
*pdev)
host1x_intr_deinit(host);
host1x_syncpt_deinit(host);
clk_disable_unprepare(host->clk);
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_disable(>dev);
+#endif
+
+   return 0;
+}
+
+#ifdef CONFIG_PM_RUNTIME
+static int host1x_runtime_suspend(struct device *dev)
+{
+   struct host1x *host;
+
+   host = dev_get_drvdata(dev);
+   if (!host)
+   return -EINVAL;
+
+   clk_disable_unprepare(host->clk);

return 0;
 }

+static int host1x_runtime_resume(struct device *dev)
+{
+   int err = 0;
+   struct host1x *host;
+
+   host = dev_get_drvdata(dev);
+   if (!host)
+   return -EINVAL;
+
+   err = clk_prepare_enable(host->clk);
+   if (err < 0)
+   dev_err(dev, "failed to enable clock\n");
+
+   return err;
+}
+#endif /* CONFIG_PM_RUNTIME */
+
+#ifdef CONFIG_PM
+static const struct dev_pm_ops host1x_pm_ops = {
+   SET_RUNTIME_PM_OPS(host1x_runtime_suspend,
+   host1x_runtime_resume, NULL)
+};
+#endif
+
 static struct platform_driver tegra_host1x_driver = {
.probe = host1x_probe,
.remove = __exit_p(host1x_remove),
@@ -190,6 +244,9 @@ static struct platform_driver tegra_host1x_driver = {
.owner = THIS_MODULE,
.name = "tegra-host1x",
.of_match_table = host1x_of_match,
+#ifdef CONFIG_PM
+   .pm = _pm_ops,
+#endif
},
 };

-- 
1.8.1.5



[PATCH v2 3/4] gpu: host1x: add runtime pm support for dc

2013-06-13 Thread Mayuresh Kulkarni
As of now, the dc clock is enabled in its .probe via
runtime pm and disabled in .remove

Signed-off-by: Mayuresh Kulkarni 
---
 drivers/gpu/host1x/drm/dc.c | 60 +
 1 file changed, 55 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/host1x/drm/dc.c b/drivers/gpu/host1x/drm/dc.c
index 5360e5a..8e669a9 100644
--- a/drivers/gpu/host1x/drm/dc.c
+++ b/drivers/gpu/host1x/drm/dc.c
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 

 #include "host1x_client.h"
 #include "dc.h"
@@ -1128,9 +1129,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
return PTR_ERR(dc->clk);
}

-   err = clk_prepare_enable(dc->clk);
-   if (err < 0)
-   return err;
+   platform_set_drvdata(pdev, dc);

regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dc->regs = devm_ioremap_resource(>dev, regs);
@@ -1147,6 +1146,15 @@ static int tegra_dc_probe(struct platform_device *pdev)
dc->client.ops = _client_ops;
dc->client.dev = >dev;

+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_enable(>dev);
+   pm_runtime_get_sync(>dev);
+#else
+   err = clk_prepare_enable(dc->clk);
+   if (err < 0)
+   return err;
+#endif
+
err = tegra_dc_rgb_probe(dc);
if (err < 0 && err != -ENODEV) {
dev_err(>dev, "failed to probe RGB output: %d\n", err);
@@ -1160,8 +1168,6 @@ static int tegra_dc_probe(struct platform_device *pdev)
return err;
}

-   platform_set_drvdata(pdev, dc);
-
return 0;
 }

@@ -1178,11 +1184,52 @@ static int tegra_dc_remove(struct platform_device *pdev)
return err;
}

+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_put(>dev);
+   pm_runtime_disable(>dev);
+#endif
+
+   return 0;
+}
+
+#ifdef CONFIG_PM_RUNTIME
+static int tegra_dc_runtime_suspend(struct device *dev)
+{
+   struct tegra_dc *dc;
+
+   dc = dev_get_drvdata(dev);
+   if (!dc)
+   return -EINVAL;
+
clk_disable_unprepare(dc->clk);

return 0;
 }

+static int tegra_dc_runtime_resume(struct device *dev)
+{
+   int err = 0;
+   struct tegra_dc *dc;
+
+   dc = dev_get_drvdata(dev);
+   if (!dc)
+   return -EINVAL;
+
+   err = clk_prepare_enable(dc->clk);
+   if (err < 0)
+   dev_err(dev, "failed to enable clock\n");
+
+   return err;
+}
+#endif /* CONFIG_PM_RUNTIME */
+
+#ifdef CONFIG_PM
+static const struct dev_pm_ops tegra_dc_pm_ops = {
+   SET_RUNTIME_PM_OPS(tegra_dc_runtime_suspend,
+   tegra_dc_runtime_resume, NULL)
+};
+#endif
+
 static struct of_device_id tegra_dc_of_match[] = {
{ .compatible = "nvidia,tegra30-dc", },
{ .compatible = "nvidia,tegra20-dc", },
@@ -1194,6 +1241,9 @@ struct platform_driver tegra_dc_driver = {
.name = "tegra-dc",
.owner = THIS_MODULE,
.of_match_table = tegra_dc_of_match,
+#ifdef CONFIG_PM
+   .pm = _dc_pm_ops,
+#endif
},
.probe = tegra_dc_probe,
.remove = tegra_dc_remove,
-- 
1.8.1.5



[PATCH v2 2/4] gpu: host1x: add runtime pm support for gr2d

2013-06-13 Thread Mayuresh Kulkarni
Signed-off-by: Mayuresh Kulkarni 
---
 drivers/gpu/host1x/drm/gr2d.c | 56 ++-
 drivers/gpu/host1x/job.c  |  9 +++
 2 files changed, 64 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/host1x/drm/gr2d.c b/drivers/gpu/host1x/drm/gr2d.c
index 27ffcf1..eb506cd 100644
--- a/drivers/gpu/host1x/drm/gr2d.c
+++ b/drivers/gpu/host1x/drm/gr2d.c
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 

 #include "channel.h"
 #include "drm.h"
@@ -275,11 +276,18 @@ static int gr2d_probe(struct platform_device *pdev)
return PTR_ERR(gr2d->clk);
}

+   platform_set_drvdata(pdev, gr2d);
+
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_enable(>dev);
+   pm_runtime_get_sync(>dev);
+#else
err = clk_prepare_enable(gr2d->clk);
if (err) {
dev_err(dev, "cannot turn on clock\n");
return err;
}
+#endif

gr2d->channel = host1x_channel_request(dev);
if (!gr2d->channel)
@@ -305,7 +313,9 @@ static int gr2d_probe(struct platform_device *pdev)

gr2d_init_addr_reg_map(dev, gr2d);

-   platform_set_drvdata(pdev, gr2d);
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_put(>dev);
+#endif

return 0;
 }
@@ -328,10 +338,51 @@ static int __exit gr2d_remove(struct platform_device 
*pdev)

host1x_channel_free(gr2d->channel);
clk_disable_unprepare(gr2d->clk);
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_disable(>dev);
+#endif
+
+   return 0;
+}
+
+#ifdef CONFIG_PM_RUNTIME
+static int gr2d_runtime_suspend(struct device *dev)
+{
+   struct gr2d *gr2d;
+
+   gr2d = dev_get_drvdata(dev);
+   if (!gr2d)
+   return -EINVAL;
+
+   clk_disable_unprepare(gr2d->clk);

return 0;
 }

+static int gr2d_runtime_resume(struct device *dev)
+{
+   int err = 0;
+   struct gr2d *gr2d;
+
+   gr2d = dev_get_drvdata(dev);
+   if (!gr2d)
+   return -EINVAL;
+
+   err = clk_prepare_enable(gr2d->clk);
+   if (err < 0)
+   dev_err(dev, "failed to enable clock\n");
+
+   return err;
+}
+#endif /* CONFIG_PM_RUNTIME */
+
+#ifdef CONFIG_PM
+static const struct dev_pm_ops gr2d_pm_ops = {
+   SET_RUNTIME_PM_OPS(gr2d_runtime_suspend,
+   gr2d_runtime_resume, NULL)
+};
+#endif
+
 struct platform_driver tegra_gr2d_driver = {
.probe = gr2d_probe,
.remove = __exit_p(gr2d_remove),
@@ -339,5 +390,8 @@ struct platform_driver tegra_gr2d_driver = {
.owner = THIS_MODULE,
.name = "gr2d",
.of_match_table = gr2d_match,
+#ifdef CONFIG_PM
+   .pm = _pm_ops,
+#endif
}
 };
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 05bafa4..a1b05f0 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 

 #include "channel.h"
@@ -591,10 +592,18 @@ int host1x_job_submit(struct host1x_job *job)
 {
struct host1x *host = dev_get_drvdata(job->channel->dev->parent);

+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_get_sync(job->channel->dev);
+#endif
+
return host1x_hw_channel_submit(host, job);
 }

 int host1x_job_complete(struct host1x_job *job)
 {
+#ifdef CONFIG_PM_RUNTIME
+   return pm_runtime_put(job->channel->dev);
+#else
return 0;
+#endif
 }
-- 
1.8.1.5



[PATCH v2 1/4] gpu: host1x: shuffle job APIs

2013-06-13 Thread Mayuresh Kulkarni
This patch moves the API host1x_job_submit to job.c file. It also
adds a new API host1x_job_complete.

This is in preparation to add runtime PM support to host1x &
its modules. The idea is to call pm_runtime_get from
host1x_job_submit and pm_runtime_put from host1x_job_complete.

This way the runtime PM calls are localized to single file &
easy to maintain as well as debug

Signed-off-by: Mayuresh Kulkarni 
---
 drivers/gpu/host1x/cdma.c|  2 ++
 drivers/gpu/host1x/channel.c |  8 
 drivers/gpu/host1x/channel.h |  1 -
 drivers/gpu/host1x/job.c | 12 
 drivers/gpu/host1x/job.h |  3 +++
 5 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c
index de72172..910087b 100644
--- a/drivers/gpu/host1x/cdma.c
+++ b/drivers/gpu/host1x/cdma.c
@@ -252,6 +252,8 @@ static void update_cdma_locked(struct host1x_cdma *cdma)
signal = true;
}

+   host1x_job_complete(job);
+
list_del(>list);
host1x_job_put(job);
}
diff --git a/drivers/gpu/host1x/channel.c b/drivers/gpu/host1x/channel.c
index 83ea51b..c381441 100644
--- a/drivers/gpu/host1x/channel.c
+++ b/drivers/gpu/host1x/channel.c
@@ -21,7 +21,6 @@

 #include "channel.h"
 #include "dev.h"
-#include "job.h"

 /* Constructor for the host1x device list */
 int host1x_channel_list_init(struct host1x *host)
@@ -37,13 +36,6 @@ int host1x_channel_list_init(struct host1x *host)
return 0;
 }

-int host1x_job_submit(struct host1x_job *job)
-{
-   struct host1x *host = dev_get_drvdata(job->channel->dev->parent);
-
-   return host1x_hw_channel_submit(host, job);
-}
-
 struct host1x_channel *host1x_channel_get(struct host1x_channel *channel)
 {
int err = 0;
diff --git a/drivers/gpu/host1x/channel.h b/drivers/gpu/host1x/channel.h
index 48723b8..8401f25 100644
--- a/drivers/gpu/host1x/channel.h
+++ b/drivers/gpu/host1x/channel.h
@@ -44,7 +44,6 @@ struct host1x_channel *host1x_channel_request(struct device 
*dev);
 void host1x_channel_free(struct host1x_channel *channel);
 struct host1x_channel *host1x_channel_get(struct host1x_channel *channel);
 void host1x_channel_put(struct host1x_channel *channel);
-int host1x_job_submit(struct host1x_job *job);

 #define host1x_for_each_channel(host, channel) \
list_for_each_entry(channel, >chlist.list, list)
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index cc80766..05bafa4 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -586,3 +586,15 @@ void host1x_job_dump(struct device *dev, struct host1x_job 
*job)
dev_dbg(dev, "NUM_SLOTS   %d\n", job->num_slots);
dev_dbg(dev, "NUM_HANDLES %d\n", job->num_unpins);
 }
+
+int host1x_job_submit(struct host1x_job *job)
+{
+   struct host1x *host = dev_get_drvdata(job->channel->dev->parent);
+
+   return host1x_hw_channel_submit(host, job);
+}
+
+int host1x_job_complete(struct host1x_job *job)
+{
+   return 0;
+}
diff --git a/drivers/gpu/host1x/job.h b/drivers/gpu/host1x/job.h
index fba45f2..e0249c3 100644
--- a/drivers/gpu/host1x/job.h
+++ b/drivers/gpu/host1x/job.h
@@ -159,4 +159,7 @@ void host1x_job_unpin(struct host1x_job *job);
  */
 void host1x_job_dump(struct device *dev, struct host1x_job *job);

+int host1x_job_submit(struct host1x_job *job);
+int host1x_job_complete(struct host1x_job *job);
+
 #endif
-- 
1.8.1.5



[PATCH v2 0/4] gpu: host1x: add runtime pm support

2013-06-13 Thread Mayuresh Kulkarni
This patch-set series adds runtime pm support for host1x,
gr2d & dc. It retains the current behaviour if CONFIG_PM_RUNTIME
is not enabled.

For host1x & gr2d, the clocks are now enabled in .probe
and disabled on its exit. This is needed for correct
init of hardware.

Additionally for gr2d, the clocks are also enabled when
a new work is submitted and disabled when the work is done.
Due to parent->child relations between host1x->gr2d,
this scheme also ends up in enabling & disabling host1x clock

For dc, the clocks are enabled in .probe and disabled in
.remove but via runtime pm instead of direct clock APIs.

Mayuresh Kulkarni (4):
  gpu: host1x: shuffle job APIs
  gpu: host1x: add runtime pm support for gr2d
  gpu: host1x: add runtime pm support for dc
  gpu: host1x: add runtime pm support for host1x

 drivers/gpu/host1x/cdma.c |  2 ++
 drivers/gpu/host1x/channel.c  |  8 --
 drivers/gpu/host1x/channel.h  |  1 -
 drivers/gpu/host1x/dev.c  | 57 
 drivers/gpu/host1x/drm/dc.c   | 60 +++
 drivers/gpu/host1x/drm/gr2d.c | 56 +++-
 drivers/gpu/host1x/job.c  | 21 +++
 drivers/gpu/host1x/job.h  |  3 +++
 8 files changed, 193 insertions(+), 15 deletions(-)

-- 
1.8.1.5



[Bug 65714] Champions of Regnum dont show characters!

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65714

--- Comment #2 from Fabio Pedretti  ---
(In reply to comment #1)
> Does the ppa enable LLVM?  If so does setting env var R600_LLVM=0 help?

The PPA is compiling with LLVM but *without* --enable-r600-llvm-compiler .

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/ddc5525b/attachment.html>


[PATCH RFC 2/8] DRM: Armada: Add Armada DRM driver

2013-06-13 Thread Daniel Vetter
On Thu, Jun 13, 2013 at 2:52 PM, Rob Clark  wrote:
> most of the embedded drivers should ignore the old_fb.. the API is a
> bit odd but the purpose is to help drivers that need to pin/unpin the
> gem objects backing the fb.  The ones that do, do something like:
>
>   foo_pin(new_fb);
>   foo_unpin(old_fb);
>
> if the two are the same, it works out.
>
> Note that even for the non error paths, new_fb and old_fb could be the same.
>
> Possibly something worth clarifying in the docs.

One implication this has is that the crtc helper assumes that the
driver modeset callbacks only fail before the driver internally has
done the pin/unpin dance. If the new fb is already the one which
should be unpinned and the modeset fails after that point, then we'll
leak stuff.

So drivers need to ensure that they undo any pin/unpins (and other fb
refcounted resource handling) if they're ->modeset callback fails.

In the new shiny drm/i915 modeset helper code we've flipped around
those semantics, but imo for the crtc helper it does fit into the
larger assumptions of the crtc helper code:
- crtc helper code assumes that all ->disable callbacks are stateless
- hence it can put the _new_ requested state into the sw tracking
structures before the modeset starts so that ->mode_fixup callbacks
could e.g. check the pixel format of the new fb.

Flipping that around would remove one of the cornerstones of the crtc
helpers, so imo doesn't make much sense. But as i915.ko demonstrates
with a bit of effort it's no problem to have a completely different
modeset sequence driver infrastructure.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=64257

vincent  changed:

   What|Removed |Added

  Attachment #80750|0   |1
is obsolete||

--- Comment #60 from vincent  ---
Created attachment 80781
  --> https://bugs.freedesktop.org/attachment.cgi?id=80781=edit
Properly set COUNT_3 v2

Sorry I sent the wrong patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/565d7d80/attachment.html>


[Bug 65714] Champions of Regnum dont show characters!

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65714

Alex Deucher  changed:

   What|Removed |Added

   Assignee|mesa-dev at lists.freedesktop. |dri-devel at 
lists.freedesktop
   |org |.org
Version|9.1 |git
  Component|Mesa core   |Drivers/Gallium/r600

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/c63664fd/attachment.html>


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #59 from Marc Dietrich  ---
just did, no change in perl boy (misrendered triangles) or heaven (still
crash).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/7f216825/attachment.html>


[PATCH] radeon: Fix a false positive lockup after 10s of inactivity

2013-06-13 Thread Andy Lutomirski
On Wed, Jun 12, 2013 at 6:56 AM, Jerome Glisse  wrote:
> On Wed, Jun 12, 2013 at 6:26 AM, Michel D?nzer  wrote:
>> On Die, 2013-06-11 at 16:23 -0700, Andy Lutomirski wrote:
>>> If the device is idle for over ten seconds, then the next attempt to do
>>> anything can race with the lockup detector and cause a bogus lockup
>>> to be detected.
>>>
>>> Oddly, the situation is well-described in the lockup detector's comments
>>> and a fix is even described.  This patch implements that fix (and corrects
>>> some typos in the description).
>>>
>>> My system has been stable for about a week running this code.  Without this,
>>> my screen would go blank every now and then and, when it came back, 
>>> everything
>>> would be remarkably slow (the latter is a separate bug).
>>>
>>> Signed-off-by: Andy Lutomirski 
>>
>> [...]
>>
>>> diff --git a/drivers/gpu/drm/radeon/radeon_ring.c 
>>> b/drivers/gpu/drm/radeon/radeon_ring.c
>>> index 1ef5eaa..fb7b3ea 100644
>>> --- a/drivers/gpu/drm/radeon/radeon_ring.c
>>> +++ b/drivers/gpu/drm/radeon/radeon_ring.c
>>> @@ -547,12 +547,12 @@ void radeon_ring_lockup_update(struct radeon_ring 
>>> *ring)
>>>   * have CP rptr to a different value of jiffies wrap around which will 
>>> force
>>>   * initialization of the lockup tracking informations.
>>>   *
>>> - * A possible false positivie is if we get call after while and 
>>> last_cp_rptr ==
>>> - * the current CP rptr, even if it's unlikely it might happen. To avoid 
>>> this
>>> - * if the elapsed time since last call is bigger than 2 second than we 
>>> return
>>> - * false and update the tracking information. Due to this the caller must 
>>> call
>>> - * radeon_ring_test_lockup several time in less than 2sec for lockup to be 
>>> reported
>>> - * the fencing code should be cautious about that.
>>> + * A possible false positive is if we get called after a while and
>>> + * last_cp_rptr == the current CP rptr, even if it's unlikely it might
>>> + * happen. To avoid this if the elapsed time since the last call is bigger
>>> + * than 2 second then we return false and update the tracking
>>> + * information. Due to this the caller must call radeon_ring_test_lockup
>>> + * more frequently than once every 2s when waiting.
>>
>> Is it guaranteed that radeon_ring_test_lockup will be called more often
>> than every 2s when waiting? If not, this change might prevent a real
>> lockup from being detected?
>
> Yes it will if you wait for a fence, because the fence timeout wait is
> way smaller than 2sec so radeon_ring_is_lockup get call several time,
> which call radeon_ring_force_activity and then
> radeon_ring_test_lockup.
>
> This also means it very very very unlikely (see below for the likely
> case) to have a wrap around that give last rptr same as current one.
>
> The likely case is when you have something like a long compute, then
> nothing is lockup but you keep filling ring with
> radeon_ring_force_activity but the cp is still stuck on the ib of the
> compute stuff so rptr does not progress.
>
>> Either way, I wonder if there might not be a simpler solution to the
>> problem, e.g. by updating last_activity when submitting commands to a
>> previously empty ring.
>
> Maybe but i still don't think it should matter.
>
> Andy can you test (without your patch) and see if it helps with your issue :
> http://people.freedesktop.org/~glisse/0001-drm-radeon-update-lockup-tracking-when-scheduling-in.patch

Testing now.  I'll report back in a couple of days.

I don't think that long computes have anything to do with it.  The
bogus lockups happen when I look away from my computer for a while and
then click something.  I thing the graphics are usually completely
idle when this happens.

AFAIK I've never run an OpenCL or similar application on this system.

--Andy


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #58 from Tom Stellard  ---
Has anyone tested the patch from comment 47?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/2603eb72/attachment.html>


[PATCH RFC 2/8] DRM: Armada: Add Armada DRM driver

2013-06-13 Thread Russell King - ARM Linux
On Thu, Jun 13, 2013 at 12:50:16PM +0100, Russell King - ARM Linux wrote:
> On Thu, Jun 13, 2013 at 12:19:03PM +0100, Russell King - ARM Linux wrote:
> > The deeper I look, the more bugs there seem to be in this DRM stuff,
> > and I'm continuing to look because I'm chasing a framebuffer refcount
> > bug.
> 
> So, this refcount bug - I think I've just found it.  This is the flow of
> references to the new fb on mode set:
> 
> drm_mode_setcrtc():
> fb = drm_framebuffer_lookup(dev, crtc_req->fb_id);
> set.fb = fb;
> ret = drm_mode_set_config_internal();
> drm_mode_set_config_internal():
> fb = set->fb;
> ret = crtc->funcs->set_config(set);
> drm_crtc_helper_set_config():
> old_fb = set->crtc->fb;
> set->crtc->fb = set->fb;
> if (!drm_crtc_helper_set_mode(set->crtc, set->mode,
>   set->x, set->y,
>   old_fb)) {
> drm_helper_disable_unused_functions(dev);
> drm_helper_disable_unused_functions():
> list_for_each_entry(crtc, >mode_config.crtc_list, head) {
> crtc->enabled = drm_helper_crtc_in_use(crtc);
> if (!crtc->enabled) {
> crtc->fb = NULL;
>   }
>   }
> back to drm_mode_set_config_internal():
> if (ret == 0) {
> if (fb)
> drm_framebuffer_reference(fb);
> back to drm_mode_setcrtc():
> if (fb)
> drm_framebuffer_unreference(fb);
> 
> Assuming success all the way through, what happens when a CRTC is unused
> is:
> 
> 1. We obtain a reference in drm_mode_setcrtc() via the lookup.
> 2. We set the mode
> 3. In trying to set the mode, we discover that all connectors for the CRTC
>are in the disconnected state, and so we disable the CRTC
> 4. We set crtc->fb to NULL
> 5. back in drm_mode_set_config_internal(), we take a reference on the
>framebuffer irrespective of this.
> 6. back in drm_mode_setcrtc(), we drop the original reference caused by
>the lookup.
> 
> We now have a framebuffer with a reference count incremented by one but
> no actual reference to it - the CRTC's reference is completely lost by
> the action of drm_helper_disable_unused_functions().
> 
> You could argue that it's something the driver should deal with - fine,
> but what if it only implements the DPMS method?  Should it drop a
> reference to the framebuffer when DPMS instructs it to turn off?  Surely
> not, because that means when DPMS turns stuff back on you're missing a
> refcount.
> 
> Are drivers required to implement a disable function and cater for the
> imbalance in the upper layers of code?  If so, this is not a clean
> design.

There's a bigger issue here - if it's possible for drm_crtc_helper_set_config()
to be called with set->fb set but set->mode NULL, then we overwrite
set->fb to NULL.  Again, that results in a lost reference.

For the time being, I'm using this patch, which solves my dropped
refcount problem, and marks the other possible dropped reference.
Either that check needs to be removed or it needs to properly drop
the refcount on the fb before 'losing' the reference to it.

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index dd64a06..774d7a6 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2014,13 +2014,16 @@ int drm_mode_set_config_internal(struct drm_mode_set 
*set)

old_fb = crtc->fb;
fb = set->fb;
+   if (fb)
+   drm_framebuffer_reference(fb);

ret = crtc->funcs->set_config(set);
if (ret == 0) {
if (old_fb)
drm_framebuffer_unreference(old_fb);
+   } else {
if (fb)
-   drm_framebuffer_reference(fb);
+   drm_framebuffer_unreference(fb);
}

return ret;
diff --git a/drivers/gpu/drm/drm_crtc_helper.c 
b/drivers/gpu/drm/drm_crtc_helper.c
index 7b2d378..0d18fb2 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -299,6 +299,8 @@ void drm_helper_disable_unused_functions(struct drm_device 
*dev)
(*crtc_funcs->disable)(crtc);
else
(*crtc_funcs->dpms)(crtc, DRM_MODE_DPMS_OFF);
+   if (crtc->fb)
+   drm_framebuffer_unreference(crtc->fb);
crtc->fb = NULL;
}
}
@@ -573,6 +575,7 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)

crtc_funcs = set->crtc->helper_private;

+   /* FIXME: this loses a refcount on the fb */
if (!set->mode)
set->fb = NULL;




[PATCH v2 3/4] gpu: host1x: add runtime pm support for dc

2013-06-13 Thread Stephen Warren
On 06/13/2013 12:49 PM, Thierry Reding wrote:
> On Thu, Jun 13, 2013 at 03:23:37PM +0530, Mayuresh Kulkarni wrote: 
> [...]
>> diff --git a/drivers/gpu/host1x/drm/dc.c
>> b/drivers/gpu/host1x/drm/dc.c
> [...]
>> @@ -1128,9 +1129,7 @@ static int tegra_dc_probe(struct
>> platform_device *pdev) return PTR_ERR(dc->clk); }
>> 
>> -err = clk_prepare_enable(dc->clk); -if (err < 0) -  return
>> err; +   platform_set_drvdata(pdev, dc);
> 
> Why do you move the call to platform_set_drvdata() up here?

Presumably the suspend/resume functions need to get the value out of
the device they're passed, so it needs to be set up early?



[PATCH RFC 2/8] DRM: Armada: Add Armada DRM driver

2013-06-13 Thread Russell King - ARM Linux
On Thu, Jun 13, 2013 at 12:19:03PM +0100, Russell King - ARM Linux wrote:
> The deeper I look, the more bugs there seem to be in this DRM stuff,
> and I'm continuing to look because I'm chasing a framebuffer refcount
> bug.

So, this refcount bug - I think I've just found it.  This is the flow of
references to the new fb on mode set:

drm_mode_setcrtc():
fb = drm_framebuffer_lookup(dev, crtc_req->fb_id);
set.fb = fb;
ret = drm_mode_set_config_internal();
drm_mode_set_config_internal():
fb = set->fb;
ret = crtc->funcs->set_config(set);
drm_crtc_helper_set_config():
old_fb = set->crtc->fb;
set->crtc->fb = set->fb;
if (!drm_crtc_helper_set_mode(set->crtc, set->mode,
  set->x, set->y,
  old_fb)) {
drm_helper_disable_unused_functions(dev);
drm_helper_disable_unused_functions():
list_for_each_entry(crtc, >mode_config.crtc_list, head) {
crtc->enabled = drm_helper_crtc_in_use(crtc);
if (!crtc->enabled) {
crtc->fb = NULL;
}
}
back to drm_mode_set_config_internal():
if (ret == 0) {
if (fb)
drm_framebuffer_reference(fb);
back to drm_mode_setcrtc():
if (fb)
drm_framebuffer_unreference(fb);

Assuming success all the way through, what happens when a CRTC is unused
is:

1. We obtain a reference in drm_mode_setcrtc() via the lookup.
2. We set the mode
3. In trying to set the mode, we discover that all connectors for the CRTC
   are in the disconnected state, and so we disable the CRTC
4. We set crtc->fb to NULL
5. back in drm_mode_set_config_internal(), we take a reference on the
   framebuffer irrespective of this.
6. back in drm_mode_setcrtc(), we drop the original reference caused by
   the lookup.

We now have a framebuffer with a reference count incremented by one but
no actual reference to it - the CRTC's reference is completely lost by
the action of drm_helper_disable_unused_functions().

You could argue that it's something the driver should deal with - fine,
but what if it only implements the DPMS method?  Should it drop a
reference to the framebuffer when DPMS instructs it to turn off?  Surely
not, because that means when DPMS turns stuff back on you're missing a
refcount.

Are drivers required to implement a disable function and cater for the
imbalance in the upper layers of code?  If so, this is not a clean
design.


[PATCH] drm/omap: change "!CONFIG_FB_OMAP2" to "!FB_OMAP2"

2013-06-13 Thread Paul Bolle
On Wed, 2013-03-13 at 20:48 +0100, Paul Bolle wrote:
> Signed-off-by: Paul Bolle 
> ---
> Untested. Perhaps the first test that people with access to the relevant
> hardware might do, is to test _before applying this patch_ with FB_OMAP2
> set. Perhaps this negative dependency isn't needed at all. Or is it
> obvious?
> 
>  drivers/gpu/drm/omapdrm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This patch was sent exactly three months ago, shortly after v3.9-rc2 was
released. This obvious typo is still present in v3.10-rc5.

I didn't received any feedback on this patch. Did anyone had a look at
it? Is it perhaps queued somewhere?


Paul Bolle

> diff --git a/drivers/gpu/drm/omapdrm/Kconfig b/drivers/gpu/drm/omapdrm/Kconfig
> index 09f65dc..45875a0 100644
> --- a/drivers/gpu/drm/omapdrm/Kconfig
> +++ b/drivers/gpu/drm/omapdrm/Kconfig
> @@ -1,7 +1,7 @@
>  
>  config DRM_OMAP
>   tristate "OMAP DRM"
> - depends on DRM && !CONFIG_FB_OMAP2
> + depends on DRM && !FB_OMAP2
>   depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM
>   depends on OMAP2_DSS
>   select DRM_KMS_HELPER




[PATCH RFC 2/8] DRM: Armada: Add Armada DRM driver

2013-06-13 Thread Russell King - ARM Linux
And another issue...

What is drm_crtc_helper_set_mode() passed as the fb argument?  Is it
the old fb, or the new fb?

bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
  struct drm_display_mode *mode,
  int x, int y,
  struct drm_framebuffer *old_fb)
...
int drm_crtc_helper_set_config(struct drm_mode_set *set)
{
...
save_set.fb = set->crtc->fb;
...
old_fb = set->crtc->fb;
set->crtc->fb = set->fb;
if (!drm_crtc_helper_set_mode(set->crtc, set->mode,
  set->x, set->y,
  old_fb)) {
...
/* Try to restore the config */
if (mode_changed &&
!drm_crtc_helper_set_mode(save_set.crtc, save_set.mode, save_set.x,
  save_set.y, save_set.fb))
}
...
int drm_helper_resume_force_mode(struct drm_device *dev)
{
...
ret = drm_crtc_helper_set_mode(crtc, >mode,
   crtc->x, crtc->y, crtc->fb);

The function prototype implies it's the old fb, as does the first use.
The second and third uses of it clearly show it being the fb which we
wish to be displayed.

The deeper I look, the more bugs there seem to be in this DRM stuff,
and I'm continuing to look because I'm chasing a framebuffer refcount
bug.


[RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with pmu reg control

2013-06-13 Thread Sylwester Nawrocki
Hi,

On 06/13/2013 06:26 AM, Rahul Sharma wrote:
> Mr. Dae,
> 
> Thanks for your valuable inputs.
> 
> I posted it as RFC because, I also have received comments to register
> hdmiphy as a clock controller. As we always configure it for specific
> frequency, hdmi-phy looks similar to a PLL. But it really doesn't
> belong to that class. Secondly prior to exynos5420, it was a i2c
> device. I am not sure we can register a I2C device as a clock
> controller. I wanted to discuss and explore this option here.

Have you considered using the generic PHY framework for those HDMI 
PHY devices [1] ? I guess we could add a dedicated group of ops for 
video PHYs, similarly as is is done with struct v4l2_subdev_ops. For
configuring things like the carrier/pixel clock frequency or anything 
what's common across the video PHYs.

Perhaps you could have a look and see if this framework would be 
useful for HDMI and possibly point out anything what might be missing ?

I'm not sure it it really solves the issues specific to the Exynos 
HDMI but at least with a generic PHY driver the PHY module would be 
separate from the PHY controller, as often same HDMI DPHY can be used 
with various types of a HDMI controller. So this would allow to not 
duplicate the HDMI PHY drivers in the long-term perspective.

[1] https://lkml.org/lkml/2013/4/29/95

Thanks,
Sylwester

> As you said, in parallel, I will align these changes and along with
> "drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver"
> series and post them.
> 
> I hope we should be able to close on one of the above approaches for
> hdmiphy.
> 
> regards,
> Rahul Sharma.
> 
> On Wed, Jun 12, 2013 at 9:57 AM, Inki Dae  wrote:
>>
>> 2013/6/12 Inki Dae 
>>>
>>> Hi Rahul,
>>>
>>> This patch is important to us. Actually, previous hdmi driver had
>>> controlled hdmiphy HDMI_PHY_CONTROL as if that were a clock but now that
>>> doesn't exist anymore. So we need to discuss how hdmiphy should be handled.
>>> I konw that you had already posted hdmiphy relevant patch set, [PATCH 0/4]
>>> drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver.
>>>
>>> I think we can couple pmu register controlling codes with that patch set
>>> without RFC. Could you update and post them again? like below,
>>> [PATCH 0/4] drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver
>>> + [RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with pmu reg
>>> control
>>>
>>> And then let's start review :)
>>
>> And I think It would be better to move the pmu register controlling codes
>> into hdmiphy driver like drivers/usb/phy/phy-samsung-usb2.c driver does.
>>>
>>> Thanks,
>>> Inki Dae
>>>
>>> 2013/6/11 Rahul Sharma 

 Previously, hdmiphy is added as a dummy clock in clock file for
 exynos SoCs. Enable/Disable to this clock, actually toggles the power
 control bit in PMU, instead of controlling the clock gate.

 This RFC adds the support to parse hdmiphy control node which is a child
 node to hdmi, and map the pmu register to toggle the power control bit.

 This is based on drm-next branch in Inki Dae's tree.

 Rahul Sharma (2):
   drm/exynos: replace dummy hdmiphy clock with pmu register control
   ARM/dts: add hdmiphy power control pmu register to hdmi dt node

  arch/arm/boot/dts/exynos5250.dtsi|6 +++
  drivers/gpu/drm/exynos/exynos_hdmi.c |   69
 ++
  drivers/gpu/drm/exynos/regs-hdmi.h   |4 ++
  3 files changed, 71 insertions(+), 8 deletions(-)

 --
 1.7.10.4

-- 
Sylwester Nawrocki
Samsung R Institute Poland
Samsung Electronics


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-dae...@freedesktop.org
590, 0x13ea5c80 [ORD=164] [ID=194]
0x13ea6590: f32 = fmul 0x13ea6190, 0x13ea0740 [ORD=163] [ID=172]
  0x13ea6190: f32 = bitcast 0x13ea3360 [ORD=162] [ID=112]
0x13ea3360: i32 = CONST_ADDRESS 0x13ea3460 [ORD=157] [ID=77]
  0x13ea3460: i32 = Constant<9812> [ID=31]
  0x13ea0740: f32 = extract_vector_elt 0x13ea3660, 0x13e9c4f0
[ORD=76] [ID=161]
0x13ea3660: v4f32 = bitcast 0x13ea0230 [ORD=63] [ID=155]
  0x13ea0230: v4i32 = CONST_ADDRESS 0x13e9f830, 0x13e9cb00
[ORD=63] [ID=152]


0x13e9c4f0: i32 = Constant<3> [ID=1]
0x13ea5c80: f32 = fadd 0x13ea5b80, 0x13ea5380 [ORD=156] [ID=189]
  0x13ea5b80: f32 = fmul 0x13ea5780, 0x13e9fe30 [ORD=155] [ID=176]
0x13ea5780: f32 = bitcast 0x13ea1140 [ORD=154] [ID=110]
  0x13ea1140: i32 = CONST_ADDRESS 0x13ea0940 [ORD=149] [ID=75]

0x13e9fe30: f32 = extract_vector_elt 0x13ea0d40, 0x13e9c4f0
[ORD=59] [ID=165]
  0x13ea0d40: v4f32 = bitcast 0x13ebd680 [ORD=46] [ID=156]

  0x13e9c4f0: i32 = Constant<3> [ID=1]
  0x13ea5380: f32 = fmul 0x13ea5080, 0x13e9d900 [ORD=148] [ID=180]
0x13ea5080: f32 = bitcast 0x13e9f730 [ORD=147] [ID=108]
  0x13e9f730: i32 = CONST_ADDRESS 0x13e9d100 [ORD=143] [ID=73]

0x13e9d900: f32 = extract_vector_elt 0x13ea3560, 0x13e9c4f0
[ORD=42] [ID=169]
  0x13ea3560: v4f32 = bitcast 0x13ebd880 [ORD=29] [ID=157]

  0x13e9c4f0: i32 = Constant<3> [ID=1]
  0x13ea6a90: f32 = bitcast 0x13ea1e50 [ORD=169] [ID=114]
0x13ea1e50: i32 = CONST_ADDRESS 0x13ea1d50 [ORD=165] [ID=79]
  0x13ea1d50: i32 = Constant<9828> [ID=33]
0x13ea1a50: f32 = bitcast 0x13ea1950 [ORD=177] [ID=115]
  0x13ea1950: i32 = CONST_ADDRESS 0x13ea6890 [ORD=171] [ID=80]
0x13ea6890: i32 = Constant<9744> [ID=34]
0x13ea3760: f32 = ConstantFP<0.00e+00> [ID=6]
0x13ea3760: f32 = ConstantFP<0.00e+00> [ID=6]
0x13ea3760: f32 = ConstantFP<0.00e+00> [ID=6]
0x13ea3760: f32 = ConstantFP<0.00e+00> [ID=6]
  0x13ea1f50: f32 = bitcast 0x13eacad0 [ORD=190] [ID=118]
0x13eacad0: i32 = CONST_ADDRESS 0x13eac4d0 [ORD=171] [ID=83]
  0x13eac4d0: i32 = Constant<9756> [ID=37]
0x13eaa4b0: f32 = ConstantFP<3.00e-01> [ID=8]
In function: main
AL lib: (EE) alc_cleanup: 1 device not closed

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/4a795d9f/attachment-0001.html>


[RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with pmu reg control

2013-06-13 Thread Rahul Sharma
Mr. Dae,

Thanks for your valuable inputs.

I posted it as RFC because, I also have received comments to register
hdmiphy as a clock controller. As we always configure it for specific
frequency, hdmi-phy looks similar to a PLL. But it really doesn't
belong to that class. Secondly prior to exynos5420, it was a i2c
device. I am not sure we can register a I2C device as a clock
controller. I wanted to discuss and explore this option here.

As you said, in parallel, I will align these changes and along with
"drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver"
series and post them.

I hope we should be able to close on one of the above approaches for
hdmiphy.

regards,
Rahul Sharma.

On Wed, Jun 12, 2013 at 9:57 AM, Inki Dae  wrote:
>
>
>
> 2013/6/12 Inki Dae 
>>
>> Hi Rahul,
>>
>> This patch is important to us. Actually, previous hdmi driver had
>> controlled hdmiphy HDMI_PHY_CONTROL as if that were a clock but now that
>> doesn't exist anymore. So we need to discuss how hdmiphy should be handled.
>> I konw that you had already posted hdmiphy relevant patch set, [PATCH 0/4]
>> drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver.
>>
>> I think we can couple pmu register controlling codes with that patch set
>> without RFC. Could you update and post them again? like below,
>> [PATCH 0/4] drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver
>> + [RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with pmu reg
>> control
>>
>> And then let's start review :)
>
>
> And I think It would be better to move the pmu register controlling codes
> into hdmiphy driver like drivers/usb/phy/phy-samsung-usb2.c driver does.
>
>>
>>
>> Thanks,
>> Inki Dae
>>
>>
>>
>> 2013/6/11 Rahul Sharma 
>>>
>>> Previously, hdmiphy is added as a dummy clock in clock file for
>>> exynos SoCs. Enable/Disable to this clock, actually toggles the power
>>> control bit in PMU, instead of controlling the clock gate.
>>>
>>> This RFC adds the support to parse hdmiphy control node which is a child
>>> node to hdmi, and map the pmu register to toggle the power control bit.
>>>
>>> This is based on drm-next branch in Inki Dae's tree.
>>>
>>> Rahul Sharma (2):
>>>   drm/exynos: replace dummy hdmiphy clock with pmu register control
>>>   ARM/dts: add hdmiphy power control pmu register to hdmi dt node
>>>
>>>  arch/arm/boot/dts/exynos5250.dtsi|6 +++
>>>  drivers/gpu/drm/exynos/exynos_hdmi.c |   69
>>> ++
>>>  drivers/gpu/drm/exynos/regs-hdmi.h   |4 ++
>>>  3 files changed, 71 insertions(+), 8 deletions(-)
>>>
>>> --
>>> 1.7.10.4
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe
>>> linux-samsung-soc" in
>>> the body of a message to majordomo at vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>>
>


[PATCH] drm: Don't pass negative delta to ktime_sub_ns()

2013-06-13 Thread Daniel Vetter
On Wed, Jun 12, 2013 at 11:58:44AM +0200, Michel D?nzer wrote:
> From: Michel D?nzer 
> 
> It takes an unsigned value. This happens not to blow up on 64-bit
> architectures, but it does on 32-bit, causing
> drm_calc_vbltimestamp_from_scanoutpos() to calculate totally bogus
> timestamps for vblank events. Which in turn causes e.g. gnome-shell to
> hang after a DPMS off cycle with current xf86-video-ati Git.
> 
> Cc: stable at vger.kernel.org
> Signed-off-by: Michel D?nzer 

Our paranoid flip tester apparently hit this:

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59339
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59836
Tested-by: shui yangwei 

Cheers, Daniel
> ---
>  drivers/gpu/drm/drm_irq.c | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index a6a8643..39665f8 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -708,7 +708,10 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct 
> drm_device *dev, int crtc,
>   /* Subtract time delta from raw timestamp to get final
>* vblank_time timestamp for end of vblank.
>*/
> - etime = ktime_sub_ns(etime, delta_ns);
> + if (delta_ns < 0)
> + etime = ktime_add_ns(etime, -delta_ns);
> + else
> + etime = ktime_sub_ns(etime, delta_ns);
>   *vblank_time = ktime_to_timeval(etime);
>  
>   DRM_DEBUG("crtc %d : v %d p(%d,%d)@ %ld.%ld -> %ld.%ld [e %d us, %d 
> rep]\n",
> -- 
> 1.8.3
> 
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


[PATCH v2 2/4] gpu: host1x: add runtime pm support for gr2d

2013-06-13 Thread Stephen Warren
On 06/13/2013 03:53 AM, Mayuresh Kulkarni wrote:

Patch description?


> diff --git a/drivers/gpu/host1x/drm/gr2d.c b/drivers/gpu/host1x/drm/gr2d.c

> +#ifdef CONFIG_PM_RUNTIME
> + pm_runtime_enable(>dev);
> + pm_runtime_get_sync(>dev);
> +#else
>   err = clk_prepare_enable(gr2d->clk);
>   if (err) {
>   dev_err(dev, "cannot turn on clock\n");
>   return err;
>   }
> +#endif

The #else block here is a cut/paste of the body of
gr2d_runtime_resume(). It'd be better to call that function instead. The
following is what I ended up with in the Tegra ASoC driver in order to
support runtime PM on or off:

pm_runtime_enable(>dev);
if (!pm_runtime_enabled(>dev)) {
ret = tegra20_i2s_runtime_resume(>dev);
if (ret)
goto err_pm_disable;
}

> @@ -328,10 +338,51 @@ static int __exit gr2d_remove(struct platform_device 
> *pdev)
>  
>   host1x_channel_free(gr2d->channel);
>   clk_disable_unprepare(gr2d->clk);

Don't you need to remove that clk disable, or make it conditional upon
!PM_RUNTIME?

> +#ifdef CONFIG_PM_RUNTIME
> + pm_runtime_disable(>dev);
> +#endif

Similarly, perhaps something like the following here:

pm_runtime_disable(>dev);
if (!pm_runtime_status_suspended(>dev))
tegra20_i2s_runtime_suspend(>dev);

> @ -591,10 +592,18 @@ int host1x_job_submit(struct host1x_job *job)
>  {
>   struct host1x *host = dev_get_drvdata(job->channel->dev->parent);
>  
> +#ifdef CONFIG_PM_RUNTIME
> + pm_runtime_get_sync(job->channel->dev);
> +#endif
> +
>   return host1x_hw_channel_submit(host, job);
>  }
>  
>  int host1x_job_complete(struct host1x_job *job)
>  {
> +#ifdef CONFIG_PM_RUNTIME
> + return pm_runtime_put(job->channel->dev);
> +#else
>   return 0;
> +#endif
>  }

I don't think you need any of those ifdefs; simply call the
pm_runtime_*() functions all the time, and they'll be successful no-ops
if !PM_RUNTIME.


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #56 from Andy Furniss  ---
(In reply to comment #55)
> (In reply to comment #54)
> > Can someone provide me a link to heaven 3.0?
> http://downloads.guru3d.com/Unigine-Heaven-DX11-Benchmark-3.0-Linux-download-
> 2875.html

Forgot to put that you need to run heaven 3.0 like -

MESA_EXTENSION_OVERRIDE=-GL_ARB_shader_bit_encoding 
force_glsl_extensions_warn=true  ./heaven

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/699eaca1/attachment.html>


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #55 from Andy Furniss  ---
(In reply to comment #54)
> vincent, it seems you applied the patch to master already. I cannot find any
> difference with perl boy demo. Can someone provide me a link to heaven 3.0?
> I can only find 4.0 which requires opengl 3.3...

http://downloads.guru3d.com/Unigine-Heaven-DX11-Benchmark-3.0-Linux-download-2875.html

The patch - doesn't apply maybe it's the wrong one -

0001-R600-Use-a-refined-heuristic-to-choose-when-switchin.patch

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/acc15f20/attachment.html>


[PATCH RFC 2/8] DRM: Armada: Add Armada DRM driver

2013-06-13 Thread Rob Clark
On Thu, Jun 13, 2013 at 7:19 AM, Russell King - ARM Linux
 wrote:
> And another issue...
>
> What is drm_crtc_helper_set_mode() passed as the fb argument?  Is it
> the old fb, or the new fb?
>
> bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
>   struct drm_display_mode *mode,
>   int x, int y,
>   struct drm_framebuffer *old_fb)
> ...
> int drm_crtc_helper_set_config(struct drm_mode_set *set)
> {
> ...
> save_set.fb = set->crtc->fb;
> ...
> old_fb = set->crtc->fb;
> set->crtc->fb = set->fb;
> if (!drm_crtc_helper_set_mode(set->crtc, set->mode,
>   set->x, set->y,
>   old_fb)) {
> ...
> /* Try to restore the config */
> if (mode_changed &&
> !drm_crtc_helper_set_mode(save_set.crtc, save_set.mode, 
> save_set.x,
>   save_set.y, save_set.fb))
> }
> ...
> int drm_helper_resume_force_mode(struct drm_device *dev)
> {
> ...
> ret = drm_crtc_helper_set_mode(crtc, >mode,
>crtc->x, crtc->y, crtc->fb);
>
> The function prototype implies it's the old fb, as does the first use.
> The second and third uses of it clearly show it being the fb which we
> wish to be displayed.

most of the embedded drivers should ignore the old_fb.. the API is a
bit odd but the purpose is to help drivers that need to pin/unpin the
gem objects backing the fb.  The ones that do, do something like:

  foo_pin(new_fb);
  foo_unpin(old_fb);

if the two are the same, it works out.

Note that even for the non error paths, new_fb and old_fb could be the same.

Possibly something worth clarifying in the docs.

BR,
-R

> The deeper I look, the more bugs there seem to be in this DRM stuff,
> and I'm continuing to look because I'm chasing a framebuffer refcount
> bug.


[Bug 65416] r300g does not eliminate unread varyings

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=65416

--- Comment #6 from Stefan D?singer  ---
I guess that's ok for wined3d's purposes. We don't use either extension right
now, and if we ever use one of them we'll probably go with the ARB one anyway.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/4c56f020/attachment.html>


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #54 from Marc Dietrich  ---
vincent, it seems you applied the patch to master already. I cannot find any
difference with perl boy demo. Can someone provide me a link to heaven 3.0? I
can only find 4.0 which requires opengl 3.3...

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/8d64f13d/attachment.html>


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=64257

vincent  changed:

   What|Removed |Added

  Attachment #80740|0   |1
is obsolete||

--- Comment #53 from vincent  ---
Created attachment 80750
  --> https://bugs.freedesktop.org/attachment.cgi?id=80750=edit
Properly set COUNT_3 v2

Dos this new patch help ? It's almost the same as the previous one, but I
swaped bit order in the COUNT field.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130613/35fc5e5a/attachment.html>


[PATCH RFC 2/8] DRM: Armada: Add Armada DRM driver

2013-06-13 Thread Russell King - ARM Linux
And here's another one - look carefully at this path:

buf = dev->driver->gem_prime_export(dev, obj, flags);
if (IS_ERR(buf)) {
/* normally the created dma-buf takes ownership of the 
ref,
 * but if that fails then drop the ref
 */
drm_gem_object_unreference_unlocked(obj);
mutex_unlock(_priv->prime.lock);
return PTR_ERR(buf);
}
obj->export_dma_buf = buf;
*prime_fd = dma_buf_fd(buf, flags);
}
/* if we've exported this buffer the cheat and add it to the import list
 * so we get the correct handle back
 */
ret = drm_prime_add_imported_buf_handle(_priv->prime,
obj->export_dma_buf, handle);
if (ret) {
drm_gem_object_unreference_unlocked(obj);
mutex_unlock(_priv->prime.lock);
return ret;
}

So in the event of drm_prime_add_imported_buf_handle() returning an error,
we return that error to our caller (which will eventually be userspace)
saying that we failed.

However, we've already setup the export and obtained an fd for it, which
we resultingly now leak in that situation.

Now, second problem here - consider what happens if you ask for the same
object to be exported a second (or more) times.  Note that
obj->export_dma_buf will now be set, so we take a different path through
this code:

if (obj->export_dma_buf) {
get_dma_buf(obj->export_dma_buf);
*prime_fd = dma_buf_fd(obj->export_dma_buf, flags);
drm_gem_object_unreference_unlocked(obj);
} else {
}
/* if we've exported this buffer the cheat and add it to the import list
 * so we get the correct handle back
 */
ret = drm_prime_add_imported_buf_handle(_priv->prime,
obj->export_dma_buf, handle);
if (ret) {
drm_gem_object_unreference_unlocked(obj);
mutex_unlock(_priv->prime.lock);
return ret;
}

Now, if I in a loop in userspace doing this:

do {
drmPrimeHandleToFD(..., );
close(fd);
} while (1);

How long do you think it might take to exhaust the kmalloc() inside
drm_prime_add_imported_buf_handle() ?

It's not even trivially fixable, because drm_gem_dmabuf_release() doesn't
call drm_prime_remove_imported_buf_handle() because it has no knowledge
of the drm_prime_file_private structure to search for these things...


[PATCH] drm/mgag200: Don't do full cleanup if mgag200_device_init fails

2013-06-13 Thread Paul Menzel
Dear Christopher,


Am Mittwoch, den 05.06.2013, 11:29 -0400 schrieb Christopher Harvey:
> Running mgag200_driver_unload when the driver init fails early on
> causes functions like drm_mode_config_cleanup to be called. The
> problem is, drm_mode_config_cleanup crashes because the corresponding
> init hasn't happend yet. There really isn't anything to cleanup after
> mgag200_device_init, so we can just pass the error code upwards.
> 
> Acked-by: Julia Lemire 
> Signed-off-by: Christopher Harvey 
> ---
>  drivers/gpu/drm/mgag200/mgag200_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

[?]

Acked-by: Paul Menzel 


You should always CC the maintainer when sending in patches.


Thanks,

Paul
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: 



Re: [PATCH] drm: Don't pass negative delta to ktime_sub_ns()

2013-06-13 Thread Daniel Vetter
On Wed, Jun 12, 2013 at 11:58:44AM +0200, Michel Dänzer wrote:
 From: Michel Dänzer michel.daen...@amd.com
 
 It takes an unsigned value. This happens not to blow up on 64-bit
 architectures, but it does on 32-bit, causing
 drm_calc_vbltimestamp_from_scanoutpos() to calculate totally bogus
 timestamps for vblank events. Which in turn causes e.g. gnome-shell to
 hang after a DPMS off cycle with current xf86-video-ati Git.
 
 Cc: sta...@vger.kernel.org
 Signed-off-by: Michel Dänzer michel.daen...@amd.com

Our paranoid flip tester apparently hit this:

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59339
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59836
Tested-by: shui yangwei yangweix.s...@intel.com

Cheers, Daniel
 ---
  drivers/gpu/drm/drm_irq.c | 5 -
  1 file changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
 index a6a8643..39665f8 100644
 --- a/drivers/gpu/drm/drm_irq.c
 +++ b/drivers/gpu/drm/drm_irq.c
 @@ -708,7 +708,10 @@ int drm_calc_vbltimestamp_from_scanoutpos(struct 
 drm_device *dev, int crtc,
   /* Subtract time delta from raw timestamp to get final
* vblank_time timestamp for end of vblank.
*/
 - etime = ktime_sub_ns(etime, delta_ns);
 + if (delta_ns  0)
 + etime = ktime_add_ns(etime, -delta_ns);
 + else
 + etime = ktime_sub_ns(etime, delta_ns);
   *vblank_time = ktime_to_timeval(etime);
  
   DRM_DEBUG(crtc %d : v %d p(%d,%d)@ %ld.%ld - %ld.%ld [e %d us, %d 
 rep]\n,
 -- 
 1.8.3
 
 ___
 dri-devel mailing list
 dri-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[RFC PATCH] dmabuf-sync: Introduce buffer synchronization framework

2013-06-13 Thread Inki Dae
This patch adds a buffer synchronization framework based on DMA BUF[1]
and reservation[2] to use dma-buf resource, and based on ww-mutexes[3]
for lock mechanism.

The purpose of this framework is not only to couple cache operations,
and buffer access control to CPU and DMA but also to provide easy-to-use
interfaces for device drivers and potentially user application
(not implemented for user applications, yet). And this framework can be
used for all dma devices using system memory as dma buffer, especially
for most ARM based SoCs.

The mechanism of this framework has the following steps,
1. Register dmabufs to a sync object - A task gets a new sync object and
can add one or more dmabufs that the task wants to access.
This registering should be performed when a device context or an event
context such as a page flip event is created or before CPU accesses a shared
buffer.

dma_buf_sync_get(a sync object, a dmabuf);

2. Lock a sync object - A task tries to lock all dmabufs added in its own
sync object. Basically, the lock mechanism uses ww-mutex[1] to avoid dead
lock issue and for race condition between CPU and CPU, CPU and DMA, and DMA
and DMA. Taking a lock means that others cannot access all locked dmabufs
until the task that locked the corresponding dmabufs, unlocks all the locked
dmabufs.
This locking should be performed before DMA or CPU accesses these dmabufs.

dma_buf_sync_lock(a sync object);

3. Unlock a sync object - The task unlocks all dmabufs added in its own sync
object. The unlock means that the DMA or CPU accesses to the dmabufs have
been completed so that others may access them.
This unlocking should be performed after DMA or CPU has completed accesses
to the dmabufs.

dma_buf_sync_unlock(a sync object);

4. Unregister one or all dmabufs from a sync object - A task unregisters
the given dmabufs from the sync object. This means that the task dosen't
want to lock the dmabufs.
The unregistering should be performed after DMA or CPU has completed
accesses to the dmabufs or when dma_buf_sync_lock() is failed.

dma_buf_sync_put(a sync object, a dmabuf);
dma_buf_sync_put_all(a sync object);

The described steps may be summarized as:
get - lock - CPU or DMA access to a buffer/s - unlock - put

This framework includes the following two features.
1. read (shared) and write (exclusive) locks - A task is required to declare
the access type when the task tries to register a dmabuf;
READ, WRITE, READ DMA, or WRITE DMA.

The below is example codes,
struct dmabuf_sync *sync;

sync = dmabuf_sync_init(NULL, test sync);

dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_READ);
...

And the below can be used as access types:
DMA_BUF_ACCESS_READ,
- CPU will access a buffer for read.
DMA_BUF_ACCESS_WRITE,
- CPU will access a buffer for read or write.
DMA_BUF_ACCESS_READ | DMA_BUF_ACCESS_DMA,
- DMA will access a buffer for read
DMA_BUF_ACCESS_WRITE | DMA_BUF_ACCESS_DMA,
- DMA will access a buffer for read or write.

2. Mandatory resource releasing - a task cannot hold a lock indefinitely.
A task may never try to unlock a buffer after taking a lock to the buffer.
In this case, a timer handler to the corresponding sync object is called
in five (default) seconds and then the timed-out buffer is unlocked by work
queue handler to avoid lockups and to enforce resources of the buffer.

The below is how to use:
1. Allocate and Initialize a sync object:
struct dmabuf_sync *sync;

sync = dmabuf_sync_init(NULL, test sync);
...

2. Add a dmabuf to the sync object when setting up dma buffer relevant
   registers:
dmabuf_sync_get(sync, dmabuf, DMA_BUF_ACCESS_READ);
...

3. Lock all dmabufs of the sync object before DMA or CPU accesses
   the dmabufs:
dmabuf_sync_lock(sync);
...

4. Now CPU or DMA can access all dmabufs locked in step 3.

5. Unlock all dmabufs added in a sync object after DMA or CPU access
   to these dmabufs is completed:
dmabuf_sync_unlock(sync);

   And call the following functions to release all resources,
dmabuf_sync_put_all(sync);
dmabuf_sync_fini(sync);

You can refer to actual example codes:

https://git.kernel.org/cgit/linux/kernel/git/daeinki/drm-exynos.git/

commit/?h=dmabuf-syncid=4030bdee9bab5841ad32faade528d04cc0c5fc94


https://git.kernel.org/cgit/linux/kernel/git/daeinki/drm-exynos.git/

commit/?h=dmabuf-syncid=6ca548e9ea9e865592719ef6b1cde58366af9f5c

The framework 

[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #54 from Marc Dietrich marvi...@gmx.de ---
vincent, it seems you applied the patch to master already. I cannot find any
difference with perl boy demo. Can someone provide me a link to heaven 3.0? I
can only find 4.0 which requires opengl 3.3...

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65416] r300g does not eliminate unread varyings

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65416

--- Comment #6 from Stefan Dösinger stefandoesin...@gmx.at ---
I guess that's ok for wined3d's purposes. We don't use either extension right
now, and if we ever use one of them we'll probably go with the ARB one anyway.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #55 from Andy Furniss adf.li...@gmail.com ---
(In reply to comment #54)
 vincent, it seems you applied the patch to master already. I cannot find any
 difference with perl boy demo. Can someone provide me a link to heaven 3.0?
 I can only find 4.0 which requires opengl 3.3...

http://downloads.guru3d.com/Unigine-Heaven-DX11-Benchmark-3.0-Linux-download-2875.html

The patch - doesn't apply maybe it's the wrong one -

0001-R600-Use-a-refined-heuristic-to-choose-when-switchin.patch

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with pmu reg control

2013-06-13 Thread Sylwester Nawrocki
Hi,

On 06/13/2013 06:26 AM, Rahul Sharma wrote:
 Mr. Dae,
 
 Thanks for your valuable inputs.
 
 I posted it as RFC because, I also have received comments to register
 hdmiphy as a clock controller. As we always configure it for specific
 frequency, hdmi-phy looks similar to a PLL. But it really doesn't
 belong to that class. Secondly prior to exynos5420, it was a i2c
 device. I am not sure we can register a I2C device as a clock
 controller. I wanted to discuss and explore this option here.

Have you considered using the generic PHY framework for those HDMI 
PHY devices [1] ? I guess we could add a dedicated group of ops for 
video PHYs, similarly as is is done with struct v4l2_subdev_ops. For
configuring things like the carrier/pixel clock frequency or anything 
what's common across the video PHYs.

Perhaps you could have a look and see if this framework would be 
useful for HDMI and possibly point out anything what might be missing ?
 
I'm not sure it it really solves the issues specific to the Exynos 
HDMI but at least with a generic PHY driver the PHY module would be 
separate from the PHY controller, as often same HDMI DPHY can be used 
with various types of a HDMI controller. So this would allow to not 
duplicate the HDMI PHY drivers in the long-term perspective.

[1] https://lkml.org/lkml/2013/4/29/95

Thanks,
Sylwester

 As you said, in parallel, I will align these changes and along with
 drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver
 series and post them.
 
 I hope we should be able to close on one of the above approaches for
 hdmiphy.
 
 regards,
 Rahul Sharma.
 
 On Wed, Jun 12, 2013 at 9:57 AM, Inki Dae inki@samsung.com wrote:

 2013/6/12 Inki Dae inki@samsung.com

 Hi Rahul,

 This patch is important to us. Actually, previous hdmi driver had
 controlled hdmiphy HDMI_PHY_CONTROL as if that were a clock but now that
 doesn't exist anymore. So we need to discuss how hdmiphy should be handled.
 I konw that you had already posted hdmiphy relevant patch set, [PATCH 0/4]
 drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver.

 I think we can couple pmu register controlling codes with that patch set
 without RFC. Could you update and post them again? like below,
 [PATCH 0/4] drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver
 + [RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with pmu reg
 control

 And then let's start review :)

 And I think It would be better to move the pmu register controlling codes
 into hdmiphy driver like drivers/usb/phy/phy-samsung-usb2.c driver does.

 Thanks,
 Inki Dae

 2013/6/11 Rahul Sharma rahul.sha...@samsung.com

 Previously, hdmiphy is added as a dummy clock in clock file for
 exynos SoCs. Enable/Disable to this clock, actually toggles the power
 control bit in PMU, instead of controlling the clock gate.

 This RFC adds the support to parse hdmiphy control node which is a child
 node to hdmi, and map the pmu register to toggle the power control bit.

 This is based on drm-next branch in Inki Dae's tree.

 Rahul Sharma (2):
   drm/exynos: replace dummy hdmiphy clock with pmu register control
   ARM/dts: add hdmiphy power control pmu register to hdmi dt node

  arch/arm/boot/dts/exynos5250.dtsi|6 +++
  drivers/gpu/drm/exynos/exynos_hdmi.c |   69
 ++
  drivers/gpu/drm/exynos/regs-hdmi.h   |4 ++
  3 files changed, 71 insertions(+), 8 deletions(-)

 --
 1.7.10.4

-- 
Sylwester Nawrocki
Samsung RD Institute Poland
Samsung Electronics
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #56 from Andy Furniss adf.li...@gmail.com ---
(In reply to comment #55)
 (In reply to comment #54)
  Can someone provide me a link to heaven 3.0?
 http://downloads.guru3d.com/Unigine-Heaven-DX11-Benchmark-3.0-Linux-download-
 2875.html

Forgot to put that you need to run heaven 3.0 like -

MESA_EXTENSION_OVERRIDE=-GL_ARB_shader_bit_encoding 
force_glsl_extensions_warn=true  ./heaven

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 0/4] gpu: host1x: add runtime pm support

2013-06-13 Thread Mayuresh Kulkarni
This patch-set series adds runtime pm support for host1x,
gr2d  dc. It retains the current behaviour if CONFIG_PM_RUNTIME
is not enabled.

For host1x  gr2d, the clocks are now enabled in .probe
and disabled on its exit. This is needed for correct
init of hardware.

Additionally for gr2d, the clocks are also enabled when
a new work is submitted and disabled when the work is done.
Due to parent-child relations between host1x-gr2d,
this scheme also ends up in enabling  disabling host1x clock

For dc, the clocks are enabled in .probe and disabled in
.remove but via runtime pm instead of direct clock APIs.

Mayuresh Kulkarni (4):
  gpu: host1x: shuffle job APIs
  gpu: host1x: add runtime pm support for gr2d
  gpu: host1x: add runtime pm support for dc
  gpu: host1x: add runtime pm support for host1x

 drivers/gpu/host1x/cdma.c |  2 ++
 drivers/gpu/host1x/channel.c  |  8 --
 drivers/gpu/host1x/channel.h  |  1 -
 drivers/gpu/host1x/dev.c  | 57 
 drivers/gpu/host1x/drm/dc.c   | 60 +++
 drivers/gpu/host1x/drm/gr2d.c | 56 +++-
 drivers/gpu/host1x/job.c  | 21 +++
 drivers/gpu/host1x/job.h  |  3 +++
 8 files changed, 193 insertions(+), 15 deletions(-)

-- 
1.8.1.5

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 1/4] gpu: host1x: shuffle job APIs

2013-06-13 Thread Mayuresh Kulkarni
This patch moves the API host1x_job_submit to job.c file. It also
adds a new API host1x_job_complete.

This is in preparation to add runtime PM support to host1x 
its modules. The idea is to call pm_runtime_get from
host1x_job_submit and pm_runtime_put from host1x_job_complete.

This way the runtime PM calls are localized to single file 
easy to maintain as well as debug

Signed-off-by: Mayuresh Kulkarni mkulka...@nvidia.com
---
 drivers/gpu/host1x/cdma.c|  2 ++
 drivers/gpu/host1x/channel.c |  8 
 drivers/gpu/host1x/channel.h |  1 -
 drivers/gpu/host1x/job.c | 12 
 drivers/gpu/host1x/job.h |  3 +++
 5 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c
index de72172..910087b 100644
--- a/drivers/gpu/host1x/cdma.c
+++ b/drivers/gpu/host1x/cdma.c
@@ -252,6 +252,8 @@ static void update_cdma_locked(struct host1x_cdma *cdma)
signal = true;
}
 
+   host1x_job_complete(job);
+
list_del(job-list);
host1x_job_put(job);
}
diff --git a/drivers/gpu/host1x/channel.c b/drivers/gpu/host1x/channel.c
index 83ea51b..c381441 100644
--- a/drivers/gpu/host1x/channel.c
+++ b/drivers/gpu/host1x/channel.c
@@ -21,7 +21,6 @@
 
 #include channel.h
 #include dev.h
-#include job.h
 
 /* Constructor for the host1x device list */
 int host1x_channel_list_init(struct host1x *host)
@@ -37,13 +36,6 @@ int host1x_channel_list_init(struct host1x *host)
return 0;
 }
 
-int host1x_job_submit(struct host1x_job *job)
-{
-   struct host1x *host = dev_get_drvdata(job-channel-dev-parent);
-
-   return host1x_hw_channel_submit(host, job);
-}
-
 struct host1x_channel *host1x_channel_get(struct host1x_channel *channel)
 {
int err = 0;
diff --git a/drivers/gpu/host1x/channel.h b/drivers/gpu/host1x/channel.h
index 48723b8..8401f25 100644
--- a/drivers/gpu/host1x/channel.h
+++ b/drivers/gpu/host1x/channel.h
@@ -44,7 +44,6 @@ struct host1x_channel *host1x_channel_request(struct device 
*dev);
 void host1x_channel_free(struct host1x_channel *channel);
 struct host1x_channel *host1x_channel_get(struct host1x_channel *channel);
 void host1x_channel_put(struct host1x_channel *channel);
-int host1x_job_submit(struct host1x_job *job);
 
 #define host1x_for_each_channel(host, channel) \
list_for_each_entry(channel, host-chlist.list, list)
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index cc80766..05bafa4 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -586,3 +586,15 @@ void host1x_job_dump(struct device *dev, struct host1x_job 
*job)
dev_dbg(dev, NUM_SLOTS   %d\n, job-num_slots);
dev_dbg(dev, NUM_HANDLES %d\n, job-num_unpins);
 }
+
+int host1x_job_submit(struct host1x_job *job)
+{
+   struct host1x *host = dev_get_drvdata(job-channel-dev-parent);
+
+   return host1x_hw_channel_submit(host, job);
+}
+
+int host1x_job_complete(struct host1x_job *job)
+{
+   return 0;
+}
diff --git a/drivers/gpu/host1x/job.h b/drivers/gpu/host1x/job.h
index fba45f2..e0249c3 100644
--- a/drivers/gpu/host1x/job.h
+++ b/drivers/gpu/host1x/job.h
@@ -159,4 +159,7 @@ void host1x_job_unpin(struct host1x_job *job);
  */
 void host1x_job_dump(struct device *dev, struct host1x_job *job);
 
+int host1x_job_submit(struct host1x_job *job);
+int host1x_job_complete(struct host1x_job *job);
+
 #endif
-- 
1.8.1.5

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 2/4] gpu: host1x: add runtime pm support for gr2d

2013-06-13 Thread Mayuresh Kulkarni
Signed-off-by: Mayuresh Kulkarni mkulka...@nvidia.com
---
 drivers/gpu/host1x/drm/gr2d.c | 56 ++-
 drivers/gpu/host1x/job.c  |  9 +++
 2 files changed, 64 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/host1x/drm/gr2d.c b/drivers/gpu/host1x/drm/gr2d.c
index 27ffcf1..eb506cd 100644
--- a/drivers/gpu/host1x/drm/gr2d.c
+++ b/drivers/gpu/host1x/drm/gr2d.c
@@ -22,6 +22,7 @@
 #include linux/of.h
 #include linux/of_device.h
 #include linux/clk.h
+#include linux/pm_runtime.h
 
 #include channel.h
 #include drm.h
@@ -275,11 +276,18 @@ static int gr2d_probe(struct platform_device *pdev)
return PTR_ERR(gr2d-clk);
}
 
+   platform_set_drvdata(pdev, gr2d);
+
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_enable(pdev-dev);
+   pm_runtime_get_sync(pdev-dev);
+#else
err = clk_prepare_enable(gr2d-clk);
if (err) {
dev_err(dev, cannot turn on clock\n);
return err;
}
+#endif
 
gr2d-channel = host1x_channel_request(dev);
if (!gr2d-channel)
@@ -305,7 +313,9 @@ static int gr2d_probe(struct platform_device *pdev)
 
gr2d_init_addr_reg_map(dev, gr2d);
 
-   platform_set_drvdata(pdev, gr2d);
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_put(pdev-dev);
+#endif
 
return 0;
 }
@@ -328,10 +338,51 @@ static int __exit gr2d_remove(struct platform_device 
*pdev)
 
host1x_channel_free(gr2d-channel);
clk_disable_unprepare(gr2d-clk);
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_disable(pdev-dev);
+#endif
+
+   return 0;
+}
+
+#ifdef CONFIG_PM_RUNTIME
+static int gr2d_runtime_suspend(struct device *dev)
+{
+   struct gr2d *gr2d;
+
+   gr2d = dev_get_drvdata(dev);
+   if (!gr2d)
+   return -EINVAL;
+
+   clk_disable_unprepare(gr2d-clk);
 
return 0;
 }
 
+static int gr2d_runtime_resume(struct device *dev)
+{
+   int err = 0;
+   struct gr2d *gr2d;
+
+   gr2d = dev_get_drvdata(dev);
+   if (!gr2d)
+   return -EINVAL;
+
+   err = clk_prepare_enable(gr2d-clk);
+   if (err  0)
+   dev_err(dev, failed to enable clock\n);
+
+   return err;
+}
+#endif /* CONFIG_PM_RUNTIME */
+
+#ifdef CONFIG_PM
+static const struct dev_pm_ops gr2d_pm_ops = {
+   SET_RUNTIME_PM_OPS(gr2d_runtime_suspend,
+   gr2d_runtime_resume, NULL)
+};
+#endif
+
 struct platform_driver tegra_gr2d_driver = {
.probe = gr2d_probe,
.remove = __exit_p(gr2d_remove),
@@ -339,5 +390,8 @@ struct platform_driver tegra_gr2d_driver = {
.owner = THIS_MODULE,
.name = gr2d,
.of_match_table = gr2d_match,
+#ifdef CONFIG_PM
+   .pm = gr2d_pm_ops,
+#endif
}
 };
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 05bafa4..a1b05f0 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -23,6 +23,7 @@
 #include linux/scatterlist.h
 #include linux/slab.h
 #include linux/vmalloc.h
+#include linux/pm_runtime.h
 #include trace/events/host1x.h
 
 #include channel.h
@@ -591,10 +592,18 @@ int host1x_job_submit(struct host1x_job *job)
 {
struct host1x *host = dev_get_drvdata(job-channel-dev-parent);
 
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_get_sync(job-channel-dev);
+#endif
+
return host1x_hw_channel_submit(host, job);
 }
 
 int host1x_job_complete(struct host1x_job *job)
 {
+#ifdef CONFIG_PM_RUNTIME
+   return pm_runtime_put(job-channel-dev);
+#else
return 0;
+#endif
 }
-- 
1.8.1.5

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 3/4] gpu: host1x: add runtime pm support for dc

2013-06-13 Thread Mayuresh Kulkarni
As of now, the dc clock is enabled in its .probe via
runtime pm and disabled in .remove

Signed-off-by: Mayuresh Kulkarni mkulka...@nvidia.com
---
 drivers/gpu/host1x/drm/dc.c | 60 +
 1 file changed, 55 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/host1x/drm/dc.c b/drivers/gpu/host1x/drm/dc.c
index 5360e5a..8e669a9 100644
--- a/drivers/gpu/host1x/drm/dc.c
+++ b/drivers/gpu/host1x/drm/dc.c
@@ -13,6 +13,7 @@
 #include linux/of.h
 #include linux/platform_device.h
 #include linux/clk/tegra.h
+#include linux/pm_runtime.h
 
 #include host1x_client.h
 #include dc.h
@@ -1128,9 +1129,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
return PTR_ERR(dc-clk);
}
 
-   err = clk_prepare_enable(dc-clk);
-   if (err  0)
-   return err;
+   platform_set_drvdata(pdev, dc);
 
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dc-regs = devm_ioremap_resource(pdev-dev, regs);
@@ -1147,6 +1146,15 @@ static int tegra_dc_probe(struct platform_device *pdev)
dc-client.ops = dc_client_ops;
dc-client.dev = pdev-dev;
 
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_enable(pdev-dev);
+   pm_runtime_get_sync(pdev-dev);
+#else
+   err = clk_prepare_enable(dc-clk);
+   if (err  0)
+   return err;
+#endif
+
err = tegra_dc_rgb_probe(dc);
if (err  0  err != -ENODEV) {
dev_err(pdev-dev, failed to probe RGB output: %d\n, err);
@@ -1160,8 +1168,6 @@ static int tegra_dc_probe(struct platform_device *pdev)
return err;
}
 
-   platform_set_drvdata(pdev, dc);
-
return 0;
 }
 
@@ -1178,11 +1184,52 @@ static int tegra_dc_remove(struct platform_device *pdev)
return err;
}
 
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_put(pdev-dev);
+   pm_runtime_disable(pdev-dev);
+#endif
+
+   return 0;
+}
+
+#ifdef CONFIG_PM_RUNTIME
+static int tegra_dc_runtime_suspend(struct device *dev)
+{
+   struct tegra_dc *dc;
+
+   dc = dev_get_drvdata(dev);
+   if (!dc)
+   return -EINVAL;
+
clk_disable_unprepare(dc-clk);
 
return 0;
 }
 
+static int tegra_dc_runtime_resume(struct device *dev)
+{
+   int err = 0;
+   struct tegra_dc *dc;
+
+   dc = dev_get_drvdata(dev);
+   if (!dc)
+   return -EINVAL;
+
+   err = clk_prepare_enable(dc-clk);
+   if (err  0)
+   dev_err(dev, failed to enable clock\n);
+
+   return err;
+}
+#endif /* CONFIG_PM_RUNTIME */
+
+#ifdef CONFIG_PM
+static const struct dev_pm_ops tegra_dc_pm_ops = {
+   SET_RUNTIME_PM_OPS(tegra_dc_runtime_suspend,
+   tegra_dc_runtime_resume, NULL)
+};
+#endif
+
 static struct of_device_id tegra_dc_of_match[] = {
{ .compatible = nvidia,tegra30-dc, },
{ .compatible = nvidia,tegra20-dc, },
@@ -1194,6 +1241,9 @@ struct platform_driver tegra_dc_driver = {
.name = tegra-dc,
.owner = THIS_MODULE,
.of_match_table = tegra_dc_of_match,
+#ifdef CONFIG_PM
+   .pm = tegra_dc_pm_ops,
+#endif
},
.probe = tegra_dc_probe,
.remove = tegra_dc_remove,
-- 
1.8.1.5

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 4/4] gpu: host1x: add runtime pm support for host1x

2013-06-13 Thread Mayuresh Kulkarni
Signed-off-by: Mayuresh Kulkarni mkulka...@nvidia.com
---
 drivers/gpu/host1x/dev.c | 57 
 1 file changed, 57 insertions(+)

diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c
index 28e28a2..b43eb29 100644
--- a/drivers/gpu/host1x/dev.c
+++ b/drivers/gpu/host1x/dev.c
@@ -23,6 +23,7 @@
 #include linux/of_device.h
 #include linux/clk.h
 #include linux/io.h
+#include linux/pm_runtime.h
 
 #define CREATE_TRACE_POINTS
 #include trace/events/host1x.h
@@ -143,11 +144,16 @@ static int host1x_probe(struct platform_device *pdev)
return err;
}
 
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_enable(pdev-dev);
+   pm_runtime_get_sync(pdev-dev);
+#else
err = clk_prepare_enable(host-clk);
if (err  0) {
dev_err(pdev-dev, failed to enable clock\n);
return err;
}
+#endif
 
err = host1x_syncpt_init(host);
if (err) {
@@ -165,10 +171,17 @@ static int host1x_probe(struct platform_device *pdev)
 
host1x_drm_alloc(pdev);
 
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_put(pdev-dev);
+#endif
+
return 0;
 
 fail_deinit_syncpt:
host1x_syncpt_deinit(host);
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_put(pdev-dev);
+#endif
return err;
 }
 
@@ -179,10 +192,51 @@ static int __exit host1x_remove(struct platform_device 
*pdev)
host1x_intr_deinit(host);
host1x_syncpt_deinit(host);
clk_disable_unprepare(host-clk);
+#ifdef CONFIG_PM_RUNTIME
+   pm_runtime_disable(pdev-dev);
+#endif
+
+   return 0;
+}
+
+#ifdef CONFIG_PM_RUNTIME
+static int host1x_runtime_suspend(struct device *dev)
+{
+   struct host1x *host;
+
+   host = dev_get_drvdata(dev);
+   if (!host)
+   return -EINVAL;
+
+   clk_disable_unprepare(host-clk);
 
return 0;
 }
 
+static int host1x_runtime_resume(struct device *dev)
+{
+   int err = 0;
+   struct host1x *host;
+
+   host = dev_get_drvdata(dev);
+   if (!host)
+   return -EINVAL;
+
+   err = clk_prepare_enable(host-clk);
+   if (err  0)
+   dev_err(dev, failed to enable clock\n);
+
+   return err;
+}
+#endif /* CONFIG_PM_RUNTIME */
+
+#ifdef CONFIG_PM
+static const struct dev_pm_ops host1x_pm_ops = {
+   SET_RUNTIME_PM_OPS(host1x_runtime_suspend,
+   host1x_runtime_resume, NULL)
+};
+#endif
+
 static struct platform_driver tegra_host1x_driver = {
.probe = host1x_probe,
.remove = __exit_p(host1x_remove),
@@ -190,6 +244,9 @@ static struct platform_driver tegra_host1x_driver = {
.owner = THIS_MODULE,
.name = tegra-host1x,
.of_match_table = host1x_of_match,
+#ifdef CONFIG_PM
+   .pm = host1x_pm_ops,
+#endif
},
 };
 
-- 
1.8.1.5

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #57 from Marc Dietrich marvi...@gmx.de ---
Ok, found heaven - unfortunately, crashes with R600_LLVM=1 and works fine with
R600_LLVM=0:

MESA_EXTENSION_OVERRIDE=-GL_ARB_shader_bit_encoding
force_glsl_extensions_warn=true  ./heaven
ATTENTION: default value of option force_glsl_extensions_warn overridden by
environment.
Loading /home/marc/.Heaven/heaven_3.0.cfg...
Loading libGL.so.1...
Loading libopenal.so.1...
Set 1280x1024 fullscreen video mode
ATTENTION: default value of option force_glsl_extensions_warn overridden by
environment.
Set 1.00 gamma value
Unigine engine http://unigine.com/
Binary: Linux 64bit GCC 4.4.5 Release Mar  7 2012
Features: OpenGL OpenAL XPad360 Joystick Flash Editor
App path:  /work/Unigine-Heaven-3.0/bin/
Data path: /work/Unigine-Heaven-3.0/data/
Save path: /home/marc/.Heaven/

 System 
System: Linux 3.9.4-11.g51bf0ff-desktop x86_64
CPU: AMD Phenom(tm) II X4 B55 Processor 3214MHz MMX+ 3DNow!+ SSE SSE2 SSE3
SSE4A HTT x4
GPU: Gallium 0.4 on AMD RS880 3.0 Mesa 9.2.0-devel (git-6057d7b) x1
System memory: 3958 Mb
Video memory:  256 Mb
Sync threads:  3
Async threads: 4

 MathLib 
Set SSE2 simd processor

 Sound 
Renderer: OpenAL Soft
OpenAL vendor:   OpenAL Community
OpenAL renderer: OpenAL Soft
OpenAL version:  1.1 ALSOFT 1.15
Found AL_EXT_LINEAR_DISTANCE
Found AL_EXT_OFFSET
Found ALC_EXT_EFX
Found EFX Filter
Found EFX Reverb
Found EAX Reverb
Found QUAD16 format
Found 51CHN16 format
Found 61CHN16 format
Found 71CHN16 format
Maximum sources: 256
Maximum effect slots:4
Maximum auxiliary sends: 2

 Render 
GLRender::GLRender(): Unknown GPU
OpenGL vendor:   X.Org
OpenGL renderer: Gallium 0.4 on AMD RS880
OpenGL version:  3.0 Mesa 9.2.0-devel (git-6057d7b)
Found required GL_ARB_vertex_array_object
Found required GL_ARB_vertex_buffer_object
Found required GL_ARB_half_float_vertex
Found required GL_ARB_half_float_pixel
Found required GL_ARB_occlusion_query
Found required GL_EXT_texture3D
Found required GL_EXT_texture_cube_map
Found required GL_EXT_texture_sRGB
Found required GL_EXT_texture_swizzle
Found required GL_ARB_shader_object
Found required GL_ARB_vertex_shader
Found required GL_ARB_fragment_shader
Found required GL_ARB_draw_buffers
Found required GL_ARB_framebuffer_object
Found required GL_EXT_framebuffer_blit
Found required GL_EXT_framebuffer_multisample
Found optional GL_ARB_map_buffer_range
Found optional GL_ARB_transform_feedback
Found optional GL_ARB_draw_elements_base_vertex
Found optional GL_ARB_draw_instanced
Found optional GL_EXT_draw_buffers2
Found optional GL_ARB_blend_func_extended
Found optional GL_ARB_uniform_buffer_object
Found optional GL_ARB_gpu_shader4
Found optional GL_ARB_texture_rg
Found optional GL_ARB_texture_array
Found optional GL_ARB_texture_multisample
Found optional GL_ARB_texture_compression
Found optional GL_ARB_texture_compression_rgtc
Found optional GL_ARB_seamless_cube_map
Shading language:1.30
Vertex instructions: 16384
Fragment instructions:   16384
Maximum texture size:8192
Maximum texture units:   32
Maximum texture renders: 8

 Physics 
Physics: Multi-threaded

 PathFind 
PathFind: Multi-threaded

 Interpreter 
Version: 2.47

Unigine~# d3d11_render_use_tessellation 0 
gl_render_use_arb_tessellation_shader 0  render_shaders 2 
render_anisotropy 2  render_restart
Loading demos/heaven/unigine.cpp 45ms
Loading heaven/locale/unigine.en dictionary
Loading core/materials/default/unigine_post.mat 20 materials 44 shaders 1ms
Loading core/materials/default/unigine_render.mat 40 materials 4666 shaders
35ms
Loading core/materials/default/unigine_mesh.mat 5 materials 3386 shaders 24ms
Loading core/materials/default/unigine_mesh_paint.mat 2 materials 1134
shaders 11ms
Loading core/materials/default/unigine_mesh_tessellation.mat 5 materials 3332
shaders 25ms
Loading core/materials/default/unigine_mesh_tessellation_paint.mat 2
materials 2268 shaders 16ms
Loading core/materials/default/unigine_mesh_triplanar.mat 1 material 112
shaders 2ms
Loading core/materials/default/unigine_mesh_overlay.mat 1 material 220
shaders 3ms
Loading core/materials/default/unigine_mesh_terrain.mat 1 material 53 shaders
3ms
Loading core/materials/default/unigine_mesh_layer.mat 1 material 84 shaders
3ms
Loading core/materials/default/unigine_mesh_noise.mat 1 material 106 shaders
4ms
Loading core/materials/default/unigine_mesh_stem.mat 2 materials 1268 shaders
20ms
Loading core/materials/default/unigine_terrain.mat 1 material 312 shaders 1ms
Loading core/materials/default/unigine_grass.mat 1 material 138 shaders 6ms
Loading core/materials/default/unigine_particles.mat 1 material 101 shaders
3ms
Loading core/materials/default/unigine_billboard.mat 1 material 51 shaders
2ms
Loading core/materials/default/unigine_billboards.mat 1 material 816 shaders
10ms
Loading core/materials/default/unigine_volume.mat 6 materials 45 shaders 11ms
Loading 

Re: [PATCH] drm/omap: change !CONFIG_FB_OMAP2 to !FB_OMAP2

2013-06-13 Thread Paul Bolle
On Wed, 2013-03-13 at 20:48 +0100, Paul Bolle wrote:
 Signed-off-by: Paul Bolle pebo...@tiscali.nl
 ---
 Untested. Perhaps the first test that people with access to the relevant
 hardware might do, is to test _before applying this patch_ with FB_OMAP2
 set. Perhaps this negative dependency isn't needed at all. Or is it
 obvious?
 
  drivers/gpu/drm/omapdrm/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

This patch was sent exactly three months ago, shortly after v3.9-rc2 was
released. This obvious typo is still present in v3.10-rc5.

I didn't received any feedback on this patch. Did anyone had a look at
it? Is it perhaps queued somewhere?


Paul Bolle

 diff --git a/drivers/gpu/drm/omapdrm/Kconfig b/drivers/gpu/drm/omapdrm/Kconfig
 index 09f65dc..45875a0 100644
 --- a/drivers/gpu/drm/omapdrm/Kconfig
 +++ b/drivers/gpu/drm/omapdrm/Kconfig
 @@ -1,7 +1,7 @@
  
  config DRM_OMAP
   tristate OMAP DRM
 - depends on DRM  !CONFIG_FB_OMAP2
 + depends on DRM  !FB_OMAP2
   depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM
   depends on OMAP2_DSS
   select DRM_KMS_HELPER


___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


RE: [RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with pmu reg control

2013-06-13 Thread Inki Dae


 -Original Message-
 From: Sylwester Nawrocki [mailto:s.nawro...@samsung.com]
 Sent: Thursday, June 13, 2013 5:56 PM
 To: Rahul Sharma
 Cc: Rahul Sharma; Inki Dae; linux-samsung-...@vger.kernel.org; devicetree-
 disc...@lists.ozlabs.org; DRI mailing list; Kukjin Kim; Seung-Woo Kim;
 Sean Paul; sunil joshi; Kishon Vijay Abraham I; Stephen Warren;
 grant.lik...@linaro.org
 Subject: Re: [RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with
 pmu reg control
 
 Hi,
 
 On 06/13/2013 06:26 AM, Rahul Sharma wrote:
  Mr. Dae,
 
  Thanks for your valuable inputs.
 
  I posted it as RFC because, I also have received comments to register
  hdmiphy as a clock controller. As we always configure it for specific
  frequency, hdmi-phy looks similar to a PLL. But it really doesn't
  belong to that class. Secondly prior to exynos5420, it was a i2c
  device. I am not sure we can register a I2C device as a clock
  controller. I wanted to discuss and explore this option here.
 
 Have you considered using the generic PHY framework for those HDMI
 PHY devices [1] ? I guess we could add a dedicated group of ops for
 video PHYs, similarly as is is done with struct v4l2_subdev_ops. For
 configuring things like the carrier/pixel clock frequency or anything
 what's common across the video PHYs.
 
 Perhaps you could have a look and see if this framework would be
 useful for HDMI and possibly point out anything what might be missing ?
 
 I'm not sure it it really solves the issues specific to the Exynos
 HDMI but at least with a generic PHY driver the PHY module would be
 separate from the PHY controller, as often same HDMI DPHY can be used
 with various types of a HDMI controller. So this would allow to not
 duplicate the HDMI PHY drivers in the long-term perspective.

Yeah, at least, it seems that we could use PHY module to control PMU
register, HDMI_PHY_CONTROL. However, PHY module provides only init/on/off
callbacks. As you may know, HDMIPHY needs i2c interfaces to control HDMIPHY
clock. So with PHY module, HDMIPHY driver could enable PMU more generically,
but also has to use existing i2c stuff to control HDMIPHY clock. I had a
quick review to Generic PHY Framework[v6] but I didn't see that the PHY
module could generically support more features such as i2c stuff.

Thanks,
Inki Dae

 
 [1] https://lkml.org/lkml/2013/4/29/95
 
 Thanks,
 Sylwester
 
  As you said, in parallel, I will align these changes and along with
  drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver
  series and post them.
 
  I hope we should be able to close on one of the above approaches for
  hdmiphy.
 
  regards,
  Rahul Sharma.
 
  On Wed, Jun 12, 2013 at 9:57 AM, Inki Dae inki@samsung.com wrote:
 
  2013/6/12 Inki Dae inki@samsung.com
 
  Hi Rahul,
 
  This patch is important to us. Actually, previous hdmi driver had
  controlled hdmiphy HDMI_PHY_CONTROL as if that were a clock but now
 that
  doesn't exist anymore. So we need to discuss how hdmiphy should be
 handled.
  I konw that you had already posted hdmiphy relevant patch set, [PATCH
 0/4]
  drm/exynos: hdmi: move hdmiphy related code to hdmiphy driver.
 
  I think we can couple pmu register controlling codes with that patch
 set
  without RFC. Could you update and post them again? like below,
  [PATCH 0/4] drm/exynos: hdmi: move hdmiphy related code to hdmiphy
 driver
  + [RFC 0/2] exynos5250/hdmi: replace dummy hdmiphy clock with pmu reg
  control
 
  And then let's start review :)
 
  And I think It would be better to move the pmu register controlling
 codes
  into hdmiphy driver like drivers/usb/phy/phy-samsung-usb2.c driver
does.
 
  Thanks,
  Inki Dae
 
  2013/6/11 Rahul Sharma rahul.sha...@samsung.com
 
  Previously, hdmiphy is added as a dummy clock in clock file for
  exynos SoCs. Enable/Disable to this clock, actually toggles the power
  control bit in PMU, instead of controlling the clock gate.
 
  This RFC adds the support to parse hdmiphy control node which is a
 child
  node to hdmi, and map the pmu register to toggle the power control
 bit.
 
  This is based on drm-next branch in Inki Dae's tree.
 
  Rahul Sharma (2):
drm/exynos: replace dummy hdmiphy clock with pmu register control
ARM/dts: add hdmiphy power control pmu register to hdmi dt node
 
   arch/arm/boot/dts/exynos5250.dtsi|6 +++
   drivers/gpu/drm/exynos/exynos_hdmi.c |   69
  ++
   drivers/gpu/drm/exynos/regs-hdmi.h   |4 ++
   3 files changed, 71 insertions(+), 8 deletions(-)
 
  --
  1.7.10.4
 
 --
 Sylwester Nawrocki
 Samsung RD Institute Poland
 Samsung Electronics

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


RE: [RFC PATCH] dmabuf-sync: Introduce buffer synchronization framework

2013-06-13 Thread Inki Dae

 +static void dmabuf_sync_timeout_worker(struct work_struct *work)
 +{
 + struct dmabuf_sync *sync = container_of(work, struct dmabuf_sync,
 work);
 + struct dmabuf_sync_object *sobj;
 +
 + mutex_lock(sync-lock);
 +
 + list_for_each_entry(sobj, sync-syncs, head) {
 + if (WARN_ON(!sobj-robj))
 + continue;
 +
 + printk(KERN_WARNING %s: timeout = 0x%x [type = %d,  \
 + refcnt = %d, locked = %d]\n,
 + sync-name, (u32)sobj-dmabuf,
 + sobj-access_type,
 +
atomic_read(sobj-robj-shared_cnt),
 + sobj-robj-locked);
 +
 + /* unlock only valid sync object. */
 + if (!sobj-robj-locked)
 + continue;
 +
 + if (sobj-robj-shared 
 + atomic_read(sobj-robj-shared_cnt)  1) {
 + atomic_dec(sobj-robj-shared_cnt);
 + continue;
 + }
 +
 + ww_mutex_unlock(sobj-robj-lock);
 +
 + if (sobj-access_type  DMA_BUF_ACCESS_READ)
 + printk(KERN_WARNING %s: r-unlocked = 0x%x\n,
 + sync-name, (u32)sobj-dmabuf);
 + else
 + printk(KERN_WARNING %s: w-unlocked = 0x%x\n,
 + sync-name, (u32)sobj-dmabuf);
 +
 +#if defined(CONFIG_DEBUG_FS)
 + sync_debugfs_timeout_cnt++;
 +#endif

Oops, unnecessary codes. will remove them.

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


RE: [PATCH 1/4] drm/exynos: Prepare/Unprepare HDMI subsystem clocks

2013-06-13 Thread Inki Dae
Applied.

Thanks,
Inki Dae

 -Original Message-
 From: Rahul Sharma [mailto:rahul.sha...@samsung.com]
 Sent: Tuesday, June 11, 2013 3:54 PM
 To: linux-samsung-...@vger.kernel.org;
devicetree-disc...@lists.ozlabs.org;
 dri-devel@lists.freedesktop.org
 Cc: kgene@samsung.com; sw0312@samsung.com; inki@samsung.com;
 seanp...@chromium.org; jo...@samsung.com; r.sh.o...@gmail.com; Rahul
 Sharma
 Subject: [PATCH 1/4] drm/exynos: Prepare/Unprepare HDMI subsystem clocks
 
 From: Sean Paul seanp...@chromium.org
 
 Change the clk_enable/clk_disable calls in mixer and hdmi drivers into
 clk_prepare_enable/clk_disable_unprepare, respectively.
 
 Signed-off-by: Sean Paul seanp...@chromium.org
 Signed-off-by: Rahul Sharma rahul.sha...@samsung.com
 ---
  drivers/gpu/drm/exynos/exynos_hdmi.c  |   24 
  drivers/gpu/drm/exynos/exynos_mixer.c |   12 ++--
  2 files changed, 18 insertions(+), 18 deletions(-)
 
 diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
 b/drivers/gpu/drm/exynos/exynos_hdmi.c
 index 04255fe..5a98194 100644
 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
 +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
 @@ -1117,9 +1117,9 @@ static void hdmi_v13_mode_apply(struct hdmi_context
 *hdata)
   hdmi_regs_dump(hdata, timing apply);
   }
 
 - clk_disable(hdata-res.sclk_hdmi);
 + clk_disable_unprepare(hdata-res.sclk_hdmi);
   clk_set_parent(hdata-res.sclk_hdmi, hdata-res.sclk_hdmiphy);
 - clk_enable(hdata-res.sclk_hdmi);
 + clk_prepare_enable(hdata-res.sclk_hdmi);
 
   /* enable HDMI and timing generator */
   hdmi_reg_writemask(hdata, HDMI_CON_0, ~0, HDMI_EN);
 @@ -1284,9 +1284,9 @@ static void hdmi_v14_mode_apply(struct hdmi_context
 *hdata)
   hdmi_regs_dump(hdata, timing apply);
   }
 
 - clk_disable(hdata-res.sclk_hdmi);
 + clk_disable_unprepare(hdata-res.sclk_hdmi);
   clk_set_parent(hdata-res.sclk_hdmi, hdata-res.sclk_hdmiphy);
 - clk_enable(hdata-res.sclk_hdmi);
 + clk_prepare_enable(hdata-res.sclk_hdmi);
 
   /* enable HDMI and timing generator */
   hdmi_reg_writemask(hdata, HDMI_CON_0, ~0, HDMI_EN);
 @@ -1310,9 +1310,9 @@ static void hdmiphy_conf_reset(struct hdmi_context
 *hdata)
   u8 buffer[2];
   u32 reg;
 
 - clk_disable(hdata-res.sclk_hdmi);
 + clk_disable_unprepare(hdata-res.sclk_hdmi);
   clk_set_parent(hdata-res.sclk_hdmi, hdata-res.sclk_pixel);
 - clk_enable(hdata-res.sclk_hdmi);
 + clk_prepare_enable(hdata-res.sclk_hdmi);
 
   /* operation mode */
   buffer[0] = 0x1f;
 @@ -1701,9 +1701,9 @@ static void hdmi_poweron(struct hdmi_context *hdata)
   if (regulator_bulk_enable(res-regul_count, res-regul_bulk))
   DRM_DEBUG_KMS(failed to enable regulator bulk\n);
 
 - clk_enable(res-hdmiphy);
 - clk_enable(res-hdmi);
 - clk_enable(res-sclk_hdmi);
 + clk_prepare_enable(res-hdmiphy);
 + clk_prepare_enable(res-hdmi);
 + clk_prepare_enable(res-sclk_hdmi);
 
   hdmiphy_poweron(hdata);
  }
 @@ -1726,9 +1726,9 @@ static void hdmi_poweroff(struct hdmi_context
*hdata)
   hdmiphy_conf_reset(hdata);
   hdmiphy_poweroff(hdata);
 
 - clk_disable(res-sclk_hdmi);
 - clk_disable(res-hdmi);
 - clk_disable(res-hdmiphy);
 + clk_disable_unprepare(res-sclk_hdmi);
 + clk_disable_unprepare(res-hdmi);
 + clk_disable_unprepare(res-hdmiphy);
   regulator_bulk_disable(res-regul_count, res-regul_bulk);
 
   mutex_lock(hdata-hdmi_mutex);
 diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c
 b/drivers/gpu/drm/exynos/exynos_mixer.c
 index b0882b3..978894e 100644
 --- a/drivers/gpu/drm/exynos/exynos_mixer.c
 +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
 @@ -900,10 +900,10 @@ static void mixer_poweron(struct mixer_context *ctx)
   ctx-powered = true;
   mutex_unlock(ctx-mixer_mutex);
 
 - clk_enable(res-mixer);
 + clk_prepare_enable(res-mixer);
   if (ctx-vp_enabled) {
 - clk_enable(res-vp);
 - clk_enable(res-sclk_mixer);
 + clk_prepare_enable(res-vp);
 + clk_prepare_enable(res-sclk_mixer);
   }
 
   mixer_reg_write(res, MXR_INT_EN, ctx-int_en);
 @@ -927,10 +927,10 @@ static void mixer_poweroff(struct mixer_context
*ctx)
 
   ctx-int_en = mixer_reg_read(res, MXR_INT_EN);
 
 - clk_disable(res-mixer);
 + clk_disable_unprepare(res-mixer);
   if (ctx-vp_enabled) {
 - clk_disable(res-vp);
 - clk_disable(res-sclk_mixer);
 + clk_disable_unprepare(res-vp);
 + clk_disable_unprepare(res-sclk_mixer);
   }
 
   mutex_lock(ctx-mixer_mutex);
 --
 1.7.10.4

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


RE: [PATCH 2/4] drm/exynos: add mout_hdmi clock in hdmi driver to change parent

2013-06-13 Thread Inki Dae
Applied.

Thanks,
Inki Dae

 -Original Message-
 From: Rahul Sharma [mailto:rahul.sha...@samsung.com]
 Sent: Tuesday, June 11, 2013 3:54 PM
 To: linux-samsung-...@vger.kernel.org;
devicetree-disc...@lists.ozlabs.org;
 dri-devel@lists.freedesktop.org
 Cc: kgene@samsung.com; sw0312@samsung.com; inki@samsung.com;
 seanp...@chromium.org; jo...@samsung.com; r.sh.o...@gmail.com; Rahul
 Sharma
 Subject: [PATCH 2/4] drm/exynos: add mout_hdmi clock in hdmi driver to
 change parent
 
 HDMI driver needs to configure the mout_hdmi mux clock to change
 the parent between sclk_hdmiphy and sclk_pixel.
 
 Signed-off-by: Rahul Sharma rahul.sha...@samsung.com
 ---
  drivers/gpu/drm/exynos/exynos_hdmi.c |   14 ++
  1 file changed, 10 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c
 b/drivers/gpu/drm/exynos/exynos_hdmi.c
 index 5a98194..3b5e215 100644
 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
 +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
 @@ -83,6 +83,7 @@ struct hdmi_resources {
   struct clk  *sclk_pixel;
   struct clk  *sclk_hdmiphy;
   struct clk  *hdmiphy;
 + struct clk  *mout_hdmi;
   struct regulator_bulk_data  *regul_bulk;
   int regul_count;
  };
 @@ -1118,7 +1119,7 @@ static void hdmi_v13_mode_apply(struct hdmi_context
 *hdata)
   }
 
   clk_disable_unprepare(hdata-res.sclk_hdmi);
 - clk_set_parent(hdata-res.sclk_hdmi, hdata-res.sclk_hdmiphy);
 + clk_set_parent(hdata-res.mout_hdmi, hdata-res.sclk_hdmiphy);
   clk_prepare_enable(hdata-res.sclk_hdmi);
 
   /* enable HDMI and timing generator */
 @@ -1285,7 +1286,7 @@ static void hdmi_v14_mode_apply(struct hdmi_context
 *hdata)
   }
 
   clk_disable_unprepare(hdata-res.sclk_hdmi);
 - clk_set_parent(hdata-res.sclk_hdmi, hdata-res.sclk_hdmiphy);
 + clk_set_parent(hdata-res.mout_hdmi, hdata-res.sclk_hdmiphy);
   clk_prepare_enable(hdata-res.sclk_hdmi);
 
   /* enable HDMI and timing generator */
 @@ -1311,7 +1312,7 @@ static void hdmiphy_conf_reset(struct hdmi_context
 *hdata)
   u32 reg;
 
   clk_disable_unprepare(hdata-res.sclk_hdmi);
 - clk_set_parent(hdata-res.sclk_hdmi, hdata-res.sclk_pixel);
 + clk_set_parent(hdata-res.mout_hdmi, hdata-res.sclk_pixel);
   clk_prepare_enable(hdata-res.sclk_hdmi);
 
   /* operation mode */
 @@ -1832,8 +1833,13 @@ static int hdmi_resources_init(struct hdmi_context
 *hdata)
   DRM_ERROR(failed to get clock 'hdmiphy'\n);
   goto fail;
   }
 + res-mout_hdmi = devm_clk_get(dev, mout_hdmi);
 + if (IS_ERR(res-mout_hdmi)) {
 + DRM_ERROR(failed to get clock 'mout_hdmi'\n);
 + goto fail;
 + }
 
 - clk_set_parent(res-sclk_hdmi, res-sclk_pixel);
 + clk_set_parent(res-mout_hdmi, res-sclk_pixel);
 
   res-regul_bulk = devm_kzalloc(dev, ARRAY_SIZE(supply) *
   sizeof(res-regul_bulk[0]), GFP_KERNEL);
 --
 1.7.10.4

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 3/4] ARM: dts: Add mixer clocks to mixer node

2013-06-13 Thread Inki Dae
Acked-by: Inki Dae inki@samsung.com

Thanks,
Inki Dae


2013/6/11 Rahul Sharma rahul.sha...@samsung.com

 From: Sean Paul seanp...@chromium.org

 This patch adds the mixer clocks to the mixer node in the dts file.

 Signed-off-by: Sean Paul seanp...@chromium.org
 Signed-off-by: Rahul Sharma rahul.sha...@samsung.com
 ---
  arch/arm/boot/dts/exynos5250.dtsi |2 ++
  1 file changed, 2 insertions(+)

 diff --git a/arch/arm/boot/dts/exynos5250.dtsi
 b/arch/arm/boot/dts/exynos5250.dtsi
 index 0673524..9d9496a 100644
 --- a/arch/arm/boot/dts/exynos5250.dtsi
 +++ b/arch/arm/boot/dts/exynos5250.dtsi
 @@ -614,6 +614,8 @@
 compatible = samsung,exynos5-mixer;
 reg = 0x1445 0x1;
 interrupts = 0 94 0;
 +   clocks = clock 343, clock 136;
 +   clock-names = mixer, sclk_hdmi;
 };

 dp-controller {
 --
 1.7.10.4

 --
 To unsubscribe from this list: send the line unsubscribe
 linux-samsung-soc in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 4/4] ARM/dts: add clocks to hdmi dt node for exynos5250

2013-06-13 Thread Inki Dae
Acked-by: Inki Dae inki@samsung.com

Thanks,
Inki Dae


2013/6/11 Rahul Sharma rahul.sha...@samsung.com

 Fix wrong clock numbers in hdmi dt node. Removed hdmiphy
 clock which was a dummy clock earlier and not required now.
 Also added mux clock to change the clock parent.

 Signed-off-by: Rahul Sharma rahul.sha...@samsung.com
 ---
  arch/arm/boot/dts/exynos5250.dtsi |6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

 diff --git a/arch/arm/boot/dts/exynos5250.dtsi
 b/arch/arm/boot/dts/exynos5250.dtsi
 index 9d9496a..354e14a 100644
 --- a/arch/arm/boot/dts/exynos5250.dtsi
 +++ b/arch/arm/boot/dts/exynos5250.dtsi
 @@ -604,10 +604,10 @@
 compatible = samsung,exynos5-hdmi;
 reg = 0x1453 0x7;
 interrupts = 0 95 0;
 -   clocks = clock 333, clock 136, clock 137,
 -   clock 333, clock 333;
 +   clocks = clock 344, clock 136, clock 137,
 +   clock 157, clock 1024;
 clock-names = hdmi, sclk_hdmi, sclk_pixel,
 -   sclk_hdmiphy, hdmiphy;
 +   sclk_hdmiphy, mout_hdmi;
 };

 mixer {
 --
 1.7.10.4

 --
 To unsubscribe from this list: send the line unsubscribe
 linux-samsung-soc in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/1] dRM/exynos: exynos_drm_ipp: Remove redundant break statement

2013-06-13 Thread Inki Dae
Applied.

Thanks,
Inki Dae


2013/6/11 Sachin Kamat sachin.ka...@linaro.org

 'break' after goto statement is redundant. Silences the following
 message:
 drivers/gpu/drm/exynos/exynos_drm_ipp.c:1067 exynos_drm_ipp_check_valid()
 info: ignoring unreachable code.

 Signed-off-by: Sachin Kamat sachin.ka...@linaro.org
 ---
  drivers/gpu/drm/exynos/exynos_drm_ipp.c |1 -
  1 file changed, 1 deletion(-)

 diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
 b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
 index 01cb9a0..b1ef8e7 100644
 --- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
 +++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
 @@ -1064,7 +1064,6 @@ static bool exynos_drm_ipp_check_valid(struct device
 *dev,
 default:
 DRM_ERROR(invalid state.\n);
 goto err_status;
 -   break;
 }

 return true;
 --
 1.7.9.5

 ___
 dri-devel mailing list
 dri-devel@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/dri-devel

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH RFC 2/8] DRM: Armada: Add Armada DRM driver

2013-06-13 Thread Rob Clark
On Thu, Jun 13, 2013 at 7:19 AM, Russell King - ARM Linux
li...@arm.linux.org.uk wrote:
 And another issue...

 What is drm_crtc_helper_set_mode() passed as the fb argument?  Is it
 the old fb, or the new fb?

 bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,
   struct drm_display_mode *mode,
   int x, int y,
   struct drm_framebuffer *old_fb)
 ...
 int drm_crtc_helper_set_config(struct drm_mode_set *set)
 {
 ...
 save_set.fb = set-crtc-fb;
 ...
 old_fb = set-crtc-fb;
 set-crtc-fb = set-fb;
 if (!drm_crtc_helper_set_mode(set-crtc, set-mode,
   set-x, set-y,
   old_fb)) {
 ...
 /* Try to restore the config */
 if (mode_changed 
 !drm_crtc_helper_set_mode(save_set.crtc, save_set.mode, 
 save_set.x,
   save_set.y, save_set.fb))
 }
 ...
 int drm_helper_resume_force_mode(struct drm_device *dev)
 {
 ...
 ret = drm_crtc_helper_set_mode(crtc, crtc-mode,
crtc-x, crtc-y, crtc-fb);

 The function prototype implies it's the old fb, as does the first use.
 The second and third uses of it clearly show it being the fb which we
 wish to be displayed.

most of the embedded drivers should ignore the old_fb.. the API is a
bit odd but the purpose is to help drivers that need to pin/unpin the
gem objects backing the fb.  The ones that do, do something like:

  foo_pin(new_fb);
  foo_unpin(old_fb);

if the two are the same, it works out.

Note that even for the non error paths, new_fb and old_fb could be the same.

Possibly something worth clarifying in the docs.

BR,
-R

 The deeper I look, the more bugs there seem to be in this DRM stuff,
 and I'm continuing to look because I'm chasing a framebuffer refcount
 bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH RFC 2/8] DRM: Armada: Add Armada DRM driver

2013-06-13 Thread Daniel Vetter
On Thu, Jun 13, 2013 at 2:52 PM, Rob Clark robdcl...@gmail.com wrote:
 most of the embedded drivers should ignore the old_fb.. the API is a
 bit odd but the purpose is to help drivers that need to pin/unpin the
 gem objects backing the fb.  The ones that do, do something like:

   foo_pin(new_fb);
   foo_unpin(old_fb);

 if the two are the same, it works out.

 Note that even for the non error paths, new_fb and old_fb could be the same.

 Possibly something worth clarifying in the docs.

One implication this has is that the crtc helper assumes that the
driver modeset callbacks only fail before the driver internally has
done the pin/unpin dance. If the new fb is already the one which
should be unpinned and the modeset fails after that point, then we'll
leak stuff.

So drivers need to ensure that they undo any pin/unpins (and other fb
refcounted resource handling) if they're -modeset callback fails.

In the new shiny drm/i915 modeset helper code we've flipped around
those semantics, but imo for the crtc helper it does fit into the
larger assumptions of the crtc helper code:
- crtc helper code assumes that all -disable callbacks are stateless
- hence it can put the _new_ requested state into the sw tracking
structures before the modeset starts so that -mode_fixup callbacks
could e.g. check the pixel format of the new fb.

Flipping that around would remove one of the cornerstones of the crtc
helpers, so imo doesn't make much sense. But as i915.ko demonstrates
with a bit of effort it's no problem to have a completely different
modeset sequence driver infrastructure.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #58 from Tom Stellard tstel...@gmail.com ---
Has anyone tested the patch from comment 47?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #59 from Marc Dietrich marvi...@gmx.de ---
just did, no change in perl boy (misrendered triangles) or heaven (still
crash).

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65714] Champions of Regnum dont show characters!

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65714

Alex Deucher ag...@yahoo.com changed:

   What|Removed |Added

   Assignee|mesa-dev@lists.freedesktop. |dri-devel@lists.freedesktop
   |org |.org
Version|9.1 |git
  Component|Mesa core   |Drivers/Gallium/r600

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=64257

vincent v...@ovi.com changed:

   What|Removed |Added

  Attachment #80750|0   |1
is obsolete||

--- Comment #60 from vincent v...@ovi.com ---
Created attachment 80781
  -- https://bugs.freedesktop.org/attachment.cgi?id=80781action=edit
Properly set COUNT_3 v2

Sorry I sent the wrong patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2 2/4] gpu: host1x: add runtime pm support for gr2d

2013-06-13 Thread Stephen Warren
On 06/13/2013 03:53 AM, Mayuresh Kulkarni wrote:

Patch description?


 diff --git a/drivers/gpu/host1x/drm/gr2d.c b/drivers/gpu/host1x/drm/gr2d.c

 +#ifdef CONFIG_PM_RUNTIME
 + pm_runtime_enable(pdev-dev);
 + pm_runtime_get_sync(pdev-dev);
 +#else
   err = clk_prepare_enable(gr2d-clk);
   if (err) {
   dev_err(dev, cannot turn on clock\n);
   return err;
   }
 +#endif

The #else block here is a cut/paste of the body of
gr2d_runtime_resume(). It'd be better to call that function instead. The
following is what I ended up with in the Tegra ASoC driver in order to
support runtime PM on or off:

pm_runtime_enable(pdev-dev);
if (!pm_runtime_enabled(pdev-dev)) {
ret = tegra20_i2s_runtime_resume(pdev-dev);
if (ret)
goto err_pm_disable;
}

 @@ -328,10 +338,51 @@ static int __exit gr2d_remove(struct platform_device 
 *pdev)
  
   host1x_channel_free(gr2d-channel);
   clk_disable_unprepare(gr2d-clk);

Don't you need to remove that clk disable, or make it conditional upon
!PM_RUNTIME?

 +#ifdef CONFIG_PM_RUNTIME
 + pm_runtime_disable(pdev-dev);
 +#endif

Similarly, perhaps something like the following here:

pm_runtime_disable(pdev-dev);
if (!pm_runtime_status_suspended(pdev-dev))
tegra20_i2s_runtime_suspend(pdev-dev);

 @ -591,10 +592,18 @@ int host1x_job_submit(struct host1x_job *job)
  {
   struct host1x *host = dev_get_drvdata(job-channel-dev-parent);
  
 +#ifdef CONFIG_PM_RUNTIME
 + pm_runtime_get_sync(job-channel-dev);
 +#endif
 +
   return host1x_hw_channel_submit(host, job);
  }
  
  int host1x_job_complete(struct host1x_job *job)
  {
 +#ifdef CONFIG_PM_RUNTIME
 + return pm_runtime_put(job-channel-dev);
 +#else
   return 0;
 +#endif
  }

I don't think you need any of those ifdefs; simply call the
pm_runtime_*() functions all the time, and they'll be successful no-ops
if !PM_RUNTIME.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65714] Champions of Regnum dont show characters!

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65714

--- Comment #2 from Fabio Pedretti fabio@libero.it ---
(In reply to comment #1)
 Does the ppa enable LLVM?  If so does setting env var R600_LLVM=0 help?

The PPA is compiling with LLVM but *without* --enable-r600-llvm-compiler .

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #61 from Andy Furniss adf.li...@gmail.com ---
(In reply to comment #58)
 Has anyone tested the patch from comment 47?

Oops almost missed that - It does fix heaven and pearl boy on my rv790.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65722] Before update dual display wasn't an option. Since update I have to have amp and tv on or else monitor display goes funny and cannot be used.

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65722

--- Comment #1 from Paul Sherwood pms1...@btinternet.com ---
When amp and tv are on, the POST screen shows up on both screens, then login
only shows on tv. Once Mint loads the display switches to the monitor and the
tv goes black again. 
On the display settings the tv is set to be off and monitor on.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 64257] RS880 issues with r600-llvm-compiler

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=64257

--- Comment #63 from Andy Furniss adf.li...@gmail.com ---
(In reply to comment #61)
 (In reply to comment #58)
  Has anyone tested the patch from comment 47?
 
 Oops almost missed that - It does fix heaven and pearl boy on my rv790.

Aggh ignore that it doesn't fix it - I applied the wrong patch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 51381] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting, when disabled via vgaswitcheroo

2013-06-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=51381


Christoph Haag haagch.christ...@googlemail.com changed:

   What|Removed |Added

 CC||haagch.christoph@googlemail
   ||.com




--- Comment #6 from Christoph Haag haagch.christ...@googlemail.com  
2013-06-13 17:10:13 ---
intel + radeon + vgaswitcheroo seems to have been problematic for quite some
time:
https://bugzilla.kernel.org/show_bug.cgi?id=23592

I'm using 3.10rc5.

While I have no problems with suspending or quitting X (didn't have problems
with some earlier kernels either), I have had yet another problem for some time
now. If I

start X with the radeon card enabled
then disable the radeon card with vgaswitcheroo
then switch to a tty
then switch back to X

then X hangs and I get many messages like
[  236.688466] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than
5secs aborting
[  236.688470] [drm:atom_execute_table_locked] *ERROR* atombios stuck executing
D46E (len 62, WS 0, PS 0) @ 0xD48A

I assume the problem is still the same.

The most pressing issue is that X should not get stuck, no matter what. It's
much better to reset the driver somehow, even if you lose 3d acceleration or
so. As it is now, X eats all keyboard input and you have to use sysrq keys or
reboot over ssh which is not really ideal.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 51381] [drm:atom_op_jump] *ERROR* atombios stuck in loop for more than 5secs aborting, when disabled via vgaswitcheroo

2013-06-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=51381





--- Comment #7 from Alex Deucher alexdeuc...@gmail.com  2013-06-13 17:11:40 
---
See comment #1.

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65723] New: Xonotic glsl 1.30 broken

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65723

  Priority: medium
Bug ID: 65723
  Assignee: dri-devel@lists.freedesktop.org
   Summary: Xonotic glsl 1.30 broken
  Severity: blocker
Classification: Unclassified
OS: Linux (All)
  Reporter: jrch2...@gmail.com
  Hardware: x86-64 (AMD64)
Status: NEW
   Version: git
 Component: Drivers/Gallium/radeonsi
   Product: Mesa

since glsl was enable by default xonotic 0.6 have heavy render issues 

my entire stack is git and my card is an 7770.

you can download from here the entire apitrace file[apitrace 3.0]

https://docs.google.com/uc?export=downloadconfirm=2qiwid=0B29SlCylOCovb2NpVTQ4LVdyZW8

thanks in advance

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 65723] Xonotic glsl 1.30 broken

2013-06-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65723

Rafael Castillo jrch2...@gmail.com changed:

   What|Removed |Added

   Priority|medium  |highest

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


  1   2   >