[PATCH v2 0/9] Updated fence patch series

2014-07-07 Thread Sumit Semwal
Hi Greg,

On 2 July 2014 11:07, Greg KH  wrote:
> On Tue, Jul 01, 2014 at 12:57:02PM +0200, Maarten Lankhorst wrote:
>> So after some more hacking I've moved dma-buf to its own subdirectory,
>> drivers/dma-buf and applied the fence patches to its new place. I believe 
>> that the
>> first patch should be applied regardless, and the rest should be ready now.
>> :-)
>>
>> Changes to the fence api:
>> - release_fence -> fence_release etc.
>> - __fence_init -> fence_init
>> - __fence_signal -> fence_signal_locked
>> - __fence_is_signaled -> fence_is_signaled_locked
>> - Changing BUG_ON to WARN_ON in fence_later, and return NULL if it triggers.
>>
>> Android can expose fences to userspace. It's possible to make the new fence
>> mechanism expose the same fences to userspace by changing sync_fence_create
>> to take a struct fence instead of a struct sync_pt. No other change is 
>> needed,
>> because only the fence parts of struct sync_pt are used. But because the
>> userspace fences are a separate problem and I haven't really looked at it yet
>> I feel it should stay in staging, for now.
>
> Ok, that's reasonable.
>
> At first glance, this all looks "sane" to me, any objection from anyone
> if I merge this through my driver-core tree for 3.17?
>
Fwiw, Ack from me as well!
> thanks,
>
> greg k-h
Best regards,
~Sumit.


[Intel-gfx] [PATCH 5/5] drm/i915: Kick out vga console

2014-07-07 Thread Ed Tomlinson
Hi Daniel,

The patch below also works.  You can use my Tested By for it.

Thanks
Ed Tomlinson 

PS. I _really_ need to get a serial console working on my i7 box.

On Monday 07 July 2014 14:26:54 Daniel Vetter wrote:
> On Mon, Jul 07, 2014 at 06:45:49AM -0400, Ed Tomlinson wrote:
> > Daniel,
> > 
> > I am not quite sure I understand what you want me to test?
> > Do you want me to try it without:
> > 
> > > > +   if (ret == 0) {
> > > > +   ret = do_unregister_con_driver(_con);
> 
> Below the diff of what I mean.
> -Daniel
> 
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 5e583a1838f8..bd8517151479 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1466,12 +1466,13 @@ static int i915_kick_out_vgacon(struct 
> drm_i915_private *dev_priv)
>  #else
>  static int i915_kick_out_vgacon(struct drm_i915_private *dev_priv)
>  {
> - int ret;
> + int ret = 0;
>  
>   DRM_INFO("Replacing VGA console driver\n");
>  
>   console_lock();
> - ret = do_take_over_console(_con, 0, MAX_NR_CONSOLES - 1, 1);
> + if (con_is_bound(_con))
> + ret = do_take_over_console(_con, 0, MAX_NR_CONSOLES - 1, 
> 1);
>   if (ret == 0) {
>   ret = do_unregister_con_driver(_con);
>  
> 



[Bug 81020] [radeonsi][regresssion] Wireframe of background rendered through objects in Half-Life 2: Episode 2 with MSAA enabled

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=81020

Ilia Mirkin  changed:

   What|Removed |Added

 Attachment #102397|text/plain  |image/jpeg
  mime type||

-- 
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/20140707/b8d1bef3/attachment.html>


[Bug 81020] [radeonsi][regresssion] Wireframe of background rendered through objects in Half-Life 2: Episode 2 with MSAA enabled

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=81020

Ilia Mirkin  changed:

   What|Removed |Added

 Attachment #102396|text/plain  |image/jpeg
  mime type||

-- 
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/20140707/adc235c0/attachment.html>


[Bug 81020] [radeonsi][regresssion] Wireframe of background rendered through objects in Half-Life 2: Episode 2 with MSAA enabled

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=81020

Ilia Mirkin  changed:

   What|Removed |Added

 Attachment #102395|text/plain  |image/jpeg
  mime type||

-- 
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/20140707/9dd09ce5/attachment.html>


[Bug 81020] [radeonsi][regresssion] Wireframe of background rendered through objects in Half-Life 2: Episode 2 with MSAA enabled

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=81020

--- Comment #3 from Daniel Scharrer  ---
Created attachment 102398
  --> https://bugs.freedesktop.org/attachment.cgi?id=102398=edit
White wireframe with 4xMSAA

-- 
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/20140707/3abdb4d7/attachment.html>


[Bug 81020] [radeonsi][regresssion] Wireframe of background rendered through objects in Half-Life 2: Episode 2 with MSAA enabled

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=81020

--- Comment #2 from Daniel Scharrer  ---
Created attachment 102397
  --> https://bugs.freedesktop.org/attachment.cgi?id=102397=edit
Wireframe rendered above the user interface

-- 
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/20140707/d7eacb5f/attachment.html>


[Bug 81020] [radeonsi][regresssion] Wireframe of background rendered through objects in Half-Life 2: Episode 2 with MSAA enabled

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=81020

--- Comment #1 from Daniel Scharrer  ---
Created attachment 102396
  --> https://bugs.freedesktop.org/attachment.cgi?id=102396=edit
How the scene is supposed to look

-- 
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/20140707/af69bd0e/attachment.html>


[Bug 81020] New: [radeonsi][regresssion] Wireframe of background rendered through objects in Half-Life 2: Episode 2 with MSAA enabled

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=81020

  Priority: medium
Bug ID: 81020
  Assignee: dri-devel at lists.freedesktop.org
   Summary: [radeonsi][regresssion] Wireframe of background
rendered through objects in Half-Life 2: Episode 2
with MSAA enabled
  Severity: normal
Classification: Unclassified
OS: Linux (All)
  Reporter: daniel at constexpr.org
  Hardware: Other
Status: NEW
   Version: git
 Component: Drivers/Gallium/radeonsi
   Product: Mesa

Created attachment 102395
  --> https://bugs.freedesktop.org/attachment.cgi?id=102395=edit
Wireframe rendered above foreground geometry (8xMSAA)

Black pixels along the wireframe of background geometry is rendered in front of
foreground geometry (even UI). The wireframe isn't visible all the time but
instead flickers as if there is some kind of race condition.

This is reproducible with all MSAA levels that can be set in the game (2x, 4x,
6x and 8x) - however with 2x and 4xMSAA, the wireframe is white instead of
black. Wit MSAA disabled everything is rendered correctly.


Happens as of commit f6db414f3ca2d692f262e3f5a38d4fcedbdf4f4f, does not happen
with mesa 10.2.2.

Bisecting blames commit 501fee2511a0a84303319a5e3deacf4959da5b08
Author: Marek Ol??k 
Date:   Tue May 6 13:48:11 2014 +0200

radeonsi: implement set_min_samples

This is how per-sample shading is enabled.


GPU: Radeon HD 7950 (OpenGL renderer string: Gallium 0.4 on AMD TAHITI)
LLVM compiled from svn today (r202464)
GCC: 4.8.3
Distro: Gentoo

-- 
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/20140707/0731055f/attachment-0001.html>


[Bug 80868] Support screen scaling modes for external monitors

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=80868

--- Comment #7 from Alex Deucher  ---
(In reply to comment #6)
> I tried this on a Fedora Rawhide, I tried to rebuild the provided
> 3.16.0-0.rc4 kernel with the patch. After reboot, I still don't see scaling
> mode in xrandr properties, so no, it doesn't work for me. But maybe I did
> something wrong somewhere, that's very possible.

I suspect you aren't using the patch version of the driver.  You should see the
property.  drm_object_attach_property() is what attaches the property to the
connector.

-- 
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/20140707/e2c16d76/attachment.html>


[Bug 80868] Support screen scaling modes for external monitors

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=80868

--- Comment #6 from Kamil P?ral  ---
I tried this on a Fedora Rawhide, I tried to rebuild the provided 3.16.0-0.rc4
kernel with the patch. After reboot, I still don't see scaling mode in xrandr
properties, so no, it doesn't work for me. But maybe I did something wrong
somewhere, that's very possible.

-- 
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/20140707/94fef161/attachment-0001.html>


linux-next: Tree for Jun 19 (drm/i915)

2014-07-07 Thread Daniel Vetter
On Mon, Jul 07, 2014 at 10:01:27PM +0200, Rafael J. Wysocki wrote:
> On Monday, July 07, 2014 04:54:23 PM Daniel Vetter wrote:
> > On Wed, Jun 25, 2014 at 01:01:36AM +0200, Rafael J. Wysocki wrote:
> > > On Tuesday, June 24, 2014 02:43:02 PM Jani Nikula wrote:
> > > > On Thu, 19 Jun 2014, Randy Dunlap  wrote:
> > > > > On 06/18/14 23:16, Stephen Rothwell wrote:
> > > > >> Hi all,
> > > > >> 
> > > > >> The powerpc allyesconfig is again broken more than usual.
> > > > >> 
> > > > >> Changes since 20140618:
> > > > >> 
> > > > >
> > > > > on i386:
> > > > >
> > > > > CONFIG_ACPI is not enabled.
> > > > >
> > > > >   CC  drivers/gpu/drm/i915/i915_drv.o
> > > > > ../drivers/gpu/drm/i915/i915_drv.c: In function 'i915_drm_freeze':
> > > > > ../drivers/gpu/drm/i915/i915_drv.c:547:2: error: implicit declaration 
> > > > > of function 'acpi_target_system_state' 
> > > > > [-Werror=implicit-function-declaration]
> > > > > ../drivers/gpu/drm/i915/i915_drv.c:547:36: error: 'ACPI_STATE_S3' 
> > > > > undeclared (first use in this function)
> > > > > ../drivers/gpu/drm/i915/i915_drv.c:547:36: note: each undeclared 
> > > > > identifier is reported only once for each function it appears in
> > > > >   CC  net/dccp/qpolicy.o
> > > > > cc1: some warnings being treated as errors
> > > > > make[5]: *** [drivers/gpu/drm/i915/i915_drv.o] Error 1
> > > > 
> > > > Thanks for the report, we'll fix it.
> > > > 
> > > > Can anyone explain why include/linux/acpi_bus.h has #ifdef
> > > > CONFIG_ACPI_SLEEP and conditional build for a dummy inline version of
> > > > acpi_target_system_state(), *but* that does not get included or used if
> > > > CONFIG_ACPI=n? Additionally, the combination of CONFIG_ACPI=y and
> > > > CONFIG_ACPI_SLEEP=n does not seem to work at all.
> > > 
> > > These two things look like bugs to me.  Most likely not tested thoruoughly
> > > enough.
> > > 
> > > > So we'll really have to sprinkle #ifdef CONFIG_ACPI all over, instead of
> > > > neatly using the dummy versions that someone has gone through the
> > > > trouble of adding?
> > > 
> > > No, we don't have to.
> > 
> > Back from my vacation and I didn't see a conclusion to this issue here.
> > Rafael, have you fixed this in your acpi tree or do I need to do something
> > in drm-intel?
> 
> I was on vacation too. :-)
> 
> Please have a look if i915 includes acpi/acpi_bus.h directly anywhere.  If so,
> it should include linux/acpi.h instead.  I'll fix up the rest in the ACPI 
> tree.

We seem to only use linux/acpi.h and acpi/(video|button).h, at least
according to a grep include.*acpi. So I think we're good in i915 land.
Thanks for taking care of this.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


[Bug 77677] HDMI audio on ati7750 choppy with ALSA multi-channel apps

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=77677

--- Comment #33 from G. Richard Bellamy  ---
I have this issue using both Software and Hardware decoding on XBMC.

It is MUCH worse when using VDPAU and glamor HW acceleration, but is present
with SW-only acceleration.

I have an AMD Sapphire Redeon HD7750 with an Intel i3 running 3.15.3 kernel and
a git build (via mesa-git on Arch) of Mesa, libgl and ati-dri.

-- 
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/20140707/9b60d2f7/attachment.html>


[Bug 76998] hang on CEDAR right after log on

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=76998

--- Comment #8 from Alex Deucher  ---
Created attachment 102392
  --> https://bugs.freedesktop.org/attachment.cgi?id=102392=edit
possible fix

The attached patch should fix the issue.

-- 
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/20140707/bd548b0b/attachment.html>


linux-next: Tree for Jun 19 (drm/i915)

2014-07-07 Thread Rafael J. Wysocki
On Monday, July 07, 2014 04:54:23 PM Daniel Vetter wrote:
> On Wed, Jun 25, 2014 at 01:01:36AM +0200, Rafael J. Wysocki wrote:
> > On Tuesday, June 24, 2014 02:43:02 PM Jani Nikula wrote:
> > > On Thu, 19 Jun 2014, Randy Dunlap  wrote:
> > > > On 06/18/14 23:16, Stephen Rothwell wrote:
> > > >> Hi all,
> > > >> 
> > > >> The powerpc allyesconfig is again broken more than usual.
> > > >> 
> > > >> Changes since 20140618:
> > > >> 
> > > >
> > > > on i386:
> > > >
> > > > CONFIG_ACPI is not enabled.
> > > >
> > > >   CC  drivers/gpu/drm/i915/i915_drv.o
> > > > ../drivers/gpu/drm/i915/i915_drv.c: In function 'i915_drm_freeze':
> > > > ../drivers/gpu/drm/i915/i915_drv.c:547:2: error: implicit declaration 
> > > > of function 'acpi_target_system_state' 
> > > > [-Werror=implicit-function-declaration]
> > > > ../drivers/gpu/drm/i915/i915_drv.c:547:36: error: 'ACPI_STATE_S3' 
> > > > undeclared (first use in this function)
> > > > ../drivers/gpu/drm/i915/i915_drv.c:547:36: note: each undeclared 
> > > > identifier is reported only once for each function it appears in
> > > >   CC  net/dccp/qpolicy.o
> > > > cc1: some warnings being treated as errors
> > > > make[5]: *** [drivers/gpu/drm/i915/i915_drv.o] Error 1
> > > 
> > > Thanks for the report, we'll fix it.
> > > 
> > > Can anyone explain why include/linux/acpi_bus.h has #ifdef
> > > CONFIG_ACPI_SLEEP and conditional build for a dummy inline version of
> > > acpi_target_system_state(), *but* that does not get included or used if
> > > CONFIG_ACPI=n? Additionally, the combination of CONFIG_ACPI=y and
> > > CONFIG_ACPI_SLEEP=n does not seem to work at all.
> > 
> > These two things look like bugs to me.  Most likely not tested thoruoughly
> > enough.
> > 
> > > So we'll really have to sprinkle #ifdef CONFIG_ACPI all over, instead of
> > > neatly using the dummy versions that someone has gone through the
> > > trouble of adding?
> > 
> > No, we don't have to.
> 
> Back from my vacation and I didn't see a conclusion to this issue here.
> Rafael, have you fixed this in your acpi tree or do I need to do something
> in drm-intel?

I was on vacation too. :-)

Please have a look if i915 includes acpi/acpi_bus.h directly anywhere.  If so,
it should include linux/acpi.h instead.  I'll fix up the rest in the ACPI tree.

Rafael



[PATCH 1/1] drm: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN

2014-07-07 Thread Fabian Frederick
use mm.h definition

Cc: Alex Deucher 
Cc: David Airlie 
Cc: dri-devel at lists.freedesktop.org
Signed-off-by: Fabian Frederick 
---
 drivers/gpu/drm/radeon/radeon_fb.c | 2 +-
 drivers/gpu/drm/radeon/radeon_gem.c| 2 +-
 drivers/gpu/drm/radeon/radeon_object.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_fb.c 
b/drivers/gpu/drm/radeon/radeon_fb.c
index 665ced3..9f82605 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -124,7 +124,7 @@ static int radeonfb_create_pinned_object(struct 
radeon_fbdev *rfbdev,
if (rdev->family >= CHIP_R600)
height = ALIGN(mode_cmd->height, 8);
size = mode_cmd->pitches[0] * height;
-   aligned_size = ALIGN(size, PAGE_SIZE);
+   aligned_size = PAGE_ALIGN(size);
ret = radeon_gem_object_create(rdev, aligned_size, 0,
   RADEON_GEM_DOMAIN_VRAM,
   false, true,
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c 
b/drivers/gpu/drm/radeon/radeon_gem.c
index d09650c..ae14fa4 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -569,7 +569,7 @@ int radeon_mode_dumb_create(struct drm_file *file_priv,

args->pitch = radeon_align_pitch(rdev, args->width, args->bpp, 0) * 
((args->bpp + 1) / 8);
args->size = args->pitch * args->height;
-   args->size = ALIGN(args->size, PAGE_SIZE);
+   args->size = PAGE_ALIGN(args->size);

r = radeon_gem_object_create(rdev, args->size, 0,
 RADEON_GEM_DOMAIN_VRAM,
diff --git a/drivers/gpu/drm/radeon/radeon_object.c 
b/drivers/gpu/drm/radeon/radeon_object.c
index 6c717b2..80cb77e 100644
--- a/drivers/gpu/drm/radeon/radeon_object.c
+++ b/drivers/gpu/drm/radeon/radeon_object.c
@@ -154,7 +154,7 @@ int radeon_bo_create(struct radeon_device *rdev,
size_t acc_size;
int r;

-   size = ALIGN(size, PAGE_SIZE);
+   size = PAGE_ALIGN(size);

if (kernel) {
type = ttm_bo_type_kernel;
-- 
1.8.4.5



[PATCH 1/1] drm/gma500: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN

2014-07-07 Thread Fabian Frederick
use mm.h definition

Cc: David Airlie 
Cc: Patrik Jakobsson 
Cc: Daniel Vetter 
Cc: dri-devel at lists.freedesktop.org
Signed-off-by: Fabian Frederick 
---
 drivers/gpu/drm/gma500/framebuffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/gma500/framebuffer.c 
b/drivers/gpu/drm/gma500/framebuffer.c
index e7fcc14..fc1f4e8 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -369,7 +369,7 @@ static int psbfb_create(struct psb_fbdev *fbdev,
mode_cmd.pitches[0] =  ALIGN(mode_cmd.width * ((bpp + 7) / 8), 
4096 >> pitch_lines);

size = mode_cmd.pitches[0] * mode_cmd.height;
-   size = ALIGN(size, PAGE_SIZE);
+   size = PAGE_ALIGN(size);

/* Allocate the fb in the GTT with stolen page backing */
backing = psbfb_alloc(dev, size);
@@ -397,7 +397,7 @@ static int psbfb_create(struct psb_fbdev *fbdev,
mode_cmd.pitches[0] =  ALIGN(mode_cmd.width * ((bpp + 7) / 8), 
64);

size = mode_cmd.pitches[0] * mode_cmd.height;
-   size = ALIGN(size, PAGE_SIZE);
+   size = PAGE_ALIGN(size);

/* Allocate the framebuffer in the GTT with stolen page backing 
*/
backing = psbfb_alloc(dev, size);
-- 
1.8.4.5



[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Daniel Vetter
On Mon, Jul 07, 2014 at 07:58:30PM +0200, Paolo Bonzini wrote:
> Il 07/07/2014 19:54, Daniel Vetter ha scritto:
> >On Mon, Jul 07, 2014 at 04:57:45PM +0200, Paolo Bonzini wrote:
> >>Il 07/07/2014 16:49, Daniel Vetter ha scritto:
> >>>So the correct fix to forward intel gpus to guests is indeed to somehow
> >>>fake the pch pci ids since the driver really needs them. Gross design, but
> >>>that's how the hardware works.
> >>
> >>A way that could work for virtualization is this: if you find the card has a
> >>magic subsystem vendor id, fetch the subsystem device id and use _that_ as
> >>the PCH device id.
> >>
> >>Would that work for you?
> >
> >I guess for quemu it also depends upon what windows does since we can't
> >change that. If we care about that part. Another consideration is
> >supporting older kernels, if that's possible at all.
> 
> Yes, but right now it's more important to get something that's not too gross
> for the future, for both Linux and Windows.  Hacks for existing guests can
> be done separately, especially since they might differ between Linux (check
> ISA bridge) and Windows (check 1f.0).

Well old Linux also checked 1f.0, so kinda the same really. As long as
1f.0 is an isa bridge. Wrt Windows I don't really expect them to change
this (they're probably more focuesed on the windows hypervisor or whatever).

In the end if the approach is ok for quemu and isn't much worse than what
we currently have I don't mind at all about the i915.ko code. I just want
to avoid flip-flopping around on the hack du jour like we seem to do just
now.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


[Bug 79591] possible circular locking dependency detected

2014-07-07 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=79591

--- Comment #4 from Stefan Ringel  ---
static void ttm_bo_cleanup_memtype_use(struct ttm_buffer_object *bo)
{
if (bo->bdev->driver->move_notify)
bo->bdev->driver->move_notify(bo, NULL);

if (bo->ttm) {
ttm_tt_unbind(bo->ttm);
ttm_tt_destroy(bo->ttm);
bo->ttm = NULL;
}
ttm_bo_mem_put(bo, >mem);

ww_mutex_unlock (>resv->lock);
}

The last line ? must it also change like this:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/gpu/drm/ttm/ttm_bo.c?id=c75230833ce4fbbfaa257c07b55f97912fb1dc02

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


[Bug 21239] progs/tests/afsmultiarb : incorrect rendering

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=21239

Andreas Boll  changed:

   What|Removed |Added

   Assignee|dri-devel at lists.freedesktop |mesa-dev at 
lists.freedesktop.
   |.org|org
  Component|Drivers/DRI/r200|Mesa core

-- 
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/20140707/7cfd09c9/attachment.html>


[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Paolo Bonzini
Il 07/07/2014 19:54, Daniel Vetter ha scritto:
> On Mon, Jul 07, 2014 at 04:57:45PM +0200, Paolo Bonzini wrote:
>> Il 07/07/2014 16:49, Daniel Vetter ha scritto:
>>> So the correct fix to forward intel gpus to guests is indeed to somehow
>>> fake the pch pci ids since the driver really needs them. Gross design, but
>>> that's how the hardware works.
>>
>> A way that could work for virtualization is this: if you find the card has a
>> magic subsystem vendor id, fetch the subsystem device id and use _that_ as
>> the PCH device id.
>>
>> Would that work for you?
>
> I guess for quemu it also depends upon what windows does since we can't
> change that. If we care about that part. Another consideration is
> supporting older kernels, if that's possible at all.

Yes, but right now it's more important to get something that's not too 
gross for the future, for both Linux and Windows.  Hacks for existing 
guests can be done separately, especially since they might differ 
between Linux (check ISA bridge) and Windows (check 1f.0).

Paolo



[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Daniel Vetter
On Mon, Jul 07, 2014 at 04:57:45PM +0200, Paolo Bonzini wrote:
> Il 07/07/2014 16:49, Daniel Vetter ha scritto:
> >So the correct fix to forward intel gpus to guests is indeed to somehow
> >fake the pch pci ids since the driver really needs them. Gross design, but
> >that's how the hardware works.
> 
> A way that could work for virtualization is this: if you find the card has a
> magic subsystem vendor id, fetch the subsystem device id and use _that_ as
> the PCH device id.
> 
> Would that work for you?

I guess for quemu it also depends upon what windows does since we can't
change that. If we care about that part. Another consideration is
supporting older kernels, if that's possible at all.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


[Bug 80673] XCOM: Enemy Unknown - Wrong read access when starting the game

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=80673

--- Comment #8 from Hadrien  ---
It seems that what is happening is that the "end" argument is referencing a
vertex that does not exist when glDrawRangeElementsBaseVertex is called. The
documentation says that "start" and "end" are inclusive indices so I guess a
missing "-1" in the game code is the cause of the problem.

In the last callstack, the game informs the driver that vertices 0 to 64
(inclusive) should be used for drawing:
vbo_exec_DrawRangeElementsBaseVertex(mode=4, start=0, end=64, count=168,
type=5123, indices=0x7f22c87bfeb0, basevertex=0)

And later the driver will upload data with those arguments:
u_vbuf_upload_buffers(mgr=0x7f22efa9e760, start_vertex=0, num_vertices=65,
start_instance=0, num_instances=1) 

So an attempt to upload 65 vertices is done for a range of [0..64], which is
correct as per the spec, but in my case the buffer only holds 64 elements.

I do not know how the driver can protect itself from such a case. I've been
looking at the glVertexPointer API but the client does not inform the driver of
the total size of the pointed buffer, so I don't know how to verify this kind
of out of bounds errors.

The only idea I have would be to scan all indices to get min and max values and
issue a warning if they do not fit exactly in the "start" and "end" indices.
However this would probably be ineffective as the purpose of "Range" functions
seems to be precisely to inform the driver of the range so it does not need to
compute it. Moreover, though it is ineffective to include useless vertices in
the range, the spec does not seem to forbid it.

Sadly, it seems there is nothing to do on the Mesa side. At least I will inform
the game developers about my analysis and then close this bug.

-- 
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/20140707/fc0a489a/attachment.html>


[Bug 79591] possible circular locking dependency detected

2014-07-07 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=79591

--- Comment #3 from Martin Peres  ---
I was referring to freedesktop's bug tracker. Reporting bugs to Nouveau is
explained here: http://nouveau.freedesktop.org/wiki/Bugs/

But that's ok, no need to report it once again ;)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


[RESEND PATCH v3 11/11] ARM: at91/dt: enable the LCD panel on sama5d3xek boards

2014-07-07 Thread Boris BREZILLON
Enable LCD related nodes and reference panel node in the hlcdc (HLCD
Controller) node.

Signed-off-by: Boris BREZILLON 
---
 arch/arm/boot/dts/sama5d31ek.dts | 24 
 arch/arm/boot/dts/sama5d33ek.dts | 24 
 arch/arm/boot/dts/sama5d34ek.dts | 24 
 arch/arm/boot/dts/sama5d36ek.dts | 24 
 4 files changed, 96 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d31ek.dts b/arch/arm/boot/dts/sama5d31ek.dts
index 04eec0d..338f4c3 100644
--- a/arch/arm/boot/dts/sama5d31ek.dts
+++ b/arch/arm/boot/dts/sama5d31ek.dts
@@ -33,6 +33,14 @@
status = "okay";
};

+   hlcdc: hlcdc at f003 {
+   status = "okay";
+
+   hlcdc-display-controller {
+   atmel,panel = < 3 0>;
+   };
+   };
+
macb1: ethernet at f802c000 {
status = "okay";
};
@@ -46,6 +54,22 @@
};
};

+   bl_reg: backlight_regulator {
+   status = "okay";
+   };
+
+   panel_reg: panel_regulator {
+   status = "okay";
+   };
+
+   backlight: backlight {
+   status = "okay";
+   };
+
+   panel: panel {
+   status = "okay";
+   };
+
sound {
status = "okay";
};
diff --git a/arch/arm/boot/dts/sama5d33ek.dts b/arch/arm/boot/dts/sama5d33ek.dts
index cbd6a3f..f2ab41d 100644
--- a/arch/arm/boot/dts/sama5d33ek.dts
+++ b/arch/arm/boot/dts/sama5d33ek.dts
@@ -36,9 +36,33 @@
macb0: ethernet at f0028000 {
status = "okay";
};
+
+   hlcdc: hlcdc at f003 {
+   status = "okay";
+
+   hlcdc-display-controller {
+   atmel,panel = < 3 0>;
+   };
+   };
};
};

+   bl_reg: backlight_regulator {
+   status = "okay";
+   };
+
+   panel_reg: panel_regulator {
+   status = "okay";
+   };
+
+   backlight: backlight {
+   status = "okay";
+   };
+
+   panel: panel {
+   status = "okay";
+   };
+
sound {
status = "okay";
};
diff --git a/arch/arm/boot/dts/sama5d34ek.dts b/arch/arm/boot/dts/sama5d34ek.dts
index 878aa16..0d0049c 100644
--- a/arch/arm/boot/dts/sama5d34ek.dts
+++ b/arch/arm/boot/dts/sama5d34ek.dts
@@ -46,6 +46,14 @@
macb0: ethernet at f0028000 {
status = "okay";
};
+
+   hlcdc: hlcdc at f003 {
+   status = "okay";
+
+   hlcdc-display-controller {
+   atmel,panel = < 3 0>;
+   };
+   };
};
};

@@ -56,6 +64,22 @@
};
};

+   bl_reg: backlight_regulator {
+   status = "okay";
+   };
+
+   panel_reg: panel_regulator {
+   status = "okay";
+   };
+
+   backlight: backlight {
+   status = "okay";
+   };
+
+   panel: panel {
+   status = "okay";
+   };
+
sound {
status = "okay";
};
diff --git a/arch/arm/boot/dts/sama5d36ek.dts b/arch/arm/boot/dts/sama5d36ek.dts
index 59576c6..8350358 100644
--- a/arch/arm/boot/dts/sama5d36ek.dts
+++ b/arch/arm/boot/dts/sama5d36ek.dts
@@ -41,12 +41,36 @@
status = "okay";
};

+   hlcdc: hlcdc at f003 {
+   status = "okay";
+
+   hlcdc-display-controller {
+   atmel,panel = < 3 0>;
+   };
+   };
+
macb1: ethernet at f802c000 {
status = "okay";
};
};
};

+   bl_reg: backlight_regulator {
+   status = "okay";
+   };
+
+   panel_reg: panel_regulator {
+   status = "okay";
+   };
+
+   backlight: backlight {
+   status = "okay";
+   };
+
+   panel: panel {
+   status = "okay";
+   };
+
sound {
status = "okay";
};
-- 
1.8.3.2



[RESEND PATCH v3 10/11] ARM: at91/dt: add LCD panel description to sama5d3xdm.dtsi

2014-07-07 Thread Boris BREZILLON
Add LCD panel related nodes (backlight, regulators and panel) to sama5d3
Display Module dtsi.

Reference LCD pin muxing used by sama5d3xek boards.

Signed-off-by: Boris BREZILLON 
---
 arch/arm/boot/dts/sama5d3xdm.dtsi | 43 +++
 1 file changed, 43 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d3xdm.dtsi 
b/arch/arm/boot/dts/sama5d3xdm.dtsi
index 035ab72..690055e 100644
--- a/arch/arm/boot/dts/sama5d3xdm.dtsi
+++ b/arch/arm/boot/dts/sama5d3xdm.dtsi
@@ -36,6 +36,49 @@
};
};
};
+
+   hlcdc: hlcdc at f003 {
+   hlcdc-display-controller {
+   pinctrl-names = "default", "rgb-444", 
"rgb-565", "rgb-666", "rgb-888";
+   pinctrl-0 = <_lcd_base>;
+   pinctrl-1 = <_lcd_base 
_lcd_rgb444>;
+   pinctrl-2 = <_lcd_base 
_lcd_rgb565>;
+   pinctrl-3 = <_lcd_base 
_lcd_rgb666_alt>;
+   pinctrl-4 = <_lcd_base 
_lcd_rgb888_alt>;
+   };
+   };
};
};
+
+   bl_reg: backlight_regulator {
+   compatible = "regulator-fixed";
+   regulator-name = "backlight-power-supply";
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <500>;
+   status = "disabled";
+   };
+
+   panel_reg: panel_regulator {
+   compatible = "regulator-fixed";
+   regulator-name = "panel-power-supply";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   status = "disabled";
+   };
+
+   backlight: backlight {
+   compatible = "pwm-backlight";
+   pwms = <_pwm 0 5 0>;
+   brightness-levels = <0 4 8 16 32 64 128 255>;
+   default-brightness-level = <6>;
+   power-supply = <_reg>;
+   status = "disabled";
+   };
+
+   panel: panel {
+   compatible = "foxlink,fl500wvr00-a0t", "simple-panel";
+   backlight = <>;
+   power-supply = <_reg>;
+   status = "disabled";
+   };
 };
-- 
1.8.3.2



[RESEND PATCH v3 09/11] ARM: at91/dt: define the HLCDC node available on sama5d3 SoCs

2014-07-07 Thread Boris BREZILLON
Define the HLCDC (HLCD Controller) IP available on some sama5d3 SoCs
(i.e. sama5d31, sama5d33, sama5d34 and sama5d36) in sama5d3 dtsi file.

Signed-off-by: Boris BREZILLON 
---
 arch/arm/boot/dts/sama5d3_lcd.dtsi | 20 
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi 
b/arch/arm/boot/dts/sama5d3_lcd.dtsi
index 9642eef..f6aa637 100644
--- a/arch/arm/boot/dts/sama5d3_lcd.dtsi
+++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi
@@ -166,6 +166,26 @@
};
};

+   hlcdc: hlcdc at f003 {
+   compatible = "atmel,sama5d3-hlcdc";
+   reg = <0xf003 0x2000>;
+   clocks = <_clk>, <>, <>;
+   clock-names = "periph_clk","sys_clk", 
"slow_clk";
+   status = "disabled";
+
+   hlcdc-display-controller {
+   compatible = "atmel,hlcdc-dc";
+   interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
+   };
+
+   hlcdc_pwm: hlcdc-pwm {
+   compatible = "atmel,hlcdc-pwm";
+   pinctrl-names = "default";
+   pinctrl-0 = <_lcd_pwm>;
+   #pwm-cells = <3>;
+   };
+   };
+
pmc: pmc at fc00 {
periphck {
lcdc_clk: lcdc_clk {
-- 
1.8.3.2



[RESEND PATCH v3 08/11] ARM: AT91/dt: add alternative pin muxing for sama5d3 lcd pins

2014-07-07 Thread Boris BREZILLON
Define alternative pin muxing for the LCDC pins.

Signed-off-by: Boris BREZILLON 
---
 arch/arm/boot/dts/sama5d3_lcd.dtsi | 50 ++
 1 file changed, 50 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi 
b/arch/arm/boot/dts/sama5d3_lcd.dtsi
index 2186b89..9642eef 100644
--- a/arch/arm/boot/dts/sama5d3_lcd.dtsi
+++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi
@@ -82,6 +82,28 @@
 AT91_PIOA 13 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
 AT91_PIOA 14 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
 AT91_PIOA 15 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+AT91_PIOC 16 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD16 pin */
+AT91_PIOC 17 
AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD17 pin */
+   };
+
+   pinctrl_lcd_rgb666_alt: lcd-rgb-2-alt {
+   atmel,pins =
+   ; /* LCDD17 pin */
};
@@ -104,6 +126,34 @@
 AT91_PIOA 13 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
 AT91_PIOA 14 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
 AT91_PIOA 15 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+AT91_PIOC 16 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD16 pin */
+AT91_PIOC 17 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD17 pin */
+AT91_PIOC 18 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD18 pin */
+AT91_PIOC 19 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD19 pin */
+AT91_PIOC 20 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD20 pin */
+AT91_PIOC 21 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD21 pin */
+AT91_PIOE 22 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD22 pin */
+AT91_PIOE 23 
AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
+   };
+
+   pinctrl_lcd_rgb888_alt: lcd-rgb-3-alt {
+   atmel,pins =
+   

[RESEND PATCH v3 07/11] ARM: AT91/dt: split sama5d3 lcd pin definitions to match RGB mode configs

2014-07-07 Thread Boris BREZILLON
The HLCDC (HLCD Controller) IP supports 4 different output mode (RGB444,
RGB565, RGB666 and RGB888) and the pin muxing will depend on the chosen
RGB mode.

Split pin definitions to be able to set pin config according to the
selected mode.

Signed-off-by: Boris BREZILLON 
---
 arch/arm/boot/dts/sama5d3_lcd.dtsi | 127 -
 1 file changed, 96 insertions(+), 31 deletions(-)

diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi 
b/arch/arm/boot/dts/sama5d3_lcd.dtsi
index 85d3027..2186b89 100644
--- a/arch/arm/boot/dts/sama5d3_lcd.dtsi
+++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi
@@ -15,38 +15,103 @@
apb {
pinctrl at f200 {
lcd {
-   pinctrl_lcd: lcd-0 {
+   pinctrl_lcd_pwm: lcd-pwm-0 {
+   atmel,pins = ;/* LCDPWM */
+   };
+
+   pinctrl_lcd_base: lcd-base-0 {
+   atmel,pins =
+   ; /* LCDPCK */
+   };
+
+   pinctrl_lcd_rgb444: lcd-rgb-0 {
+   atmel,pins =
+   ; /* LCDD11 pin */
+   };
+
+   pinctrl_lcd_rgb565: lcd-rgb-1 {
+   atmel,pins =
+   ; /* LCDD15 pin */
+   };
+
+   pinctrl_lcd_rgb666: lcd-rgb-2 {
+   atmel,pins =
+   ; /* LCDD17 pin */
+   };
+
+   pinctrl_lcd_rgb888: lcd-rgb-3 {
atmel,pins =
-   ; /* PE28 periph C LCDD23 pin */
+   ; /* LCDD23 pin */
};
};
};
-- 
1.8.3.2



[RESEND PATCH v3 06/11] drm: add DT bindings documentation for atmel-hlcdc-dc driver

2014-07-07 Thread Boris BREZILLON
The Atmel HLCDC (HLCD Controller) IP available on some Atmel SoCs (i.e.
at91sam9n12, at91sam9x5 family or sama5d3 family) provides a display
controller device.

The HLCDC block provides a single RGB output port, and only supports LCD
panels connection to LCD panels for now.

The atmel,panel property link the HLCDC RGB output with the LCD panel
connected on this port (note that the HLCDC RGB connector implementation
makes use of the DRM panel framework).

Connection to other external devices (DRM bridges) might be added later by
mean of a new atmel,xxx (atmel,bridge) property.

Signed-off-by: Boris BREZILLON 
---
 .../devicetree/bindings/drm/atmel-hlcdc-dc.txt | 59 ++
 1 file changed, 59 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt

diff --git a/Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt 
b/Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt
new file mode 100644
index 000..594bdb2
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt
@@ -0,0 +1,59 @@
+Device-Tree bindings for Atmel's HLCDC (High LCD Controller) DRM driver
+
+The Atmel HLCDC Display Controller is subdevice of the HLCDC MFD device.
+See Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt for more details.
+
+Required properties:
+ - compatible: value should be one of the following:
+   "atmel,hlcdc-dc"
+ - interrupts: the HLCDC interrupt definition
+ - pinctrl-names: the pin control state names. Should contain "default",
+   "rgb-444", "rgb-565", "rgb-666" and "rgb-888".
+ - pinctrl-[0-4]: should contain the pinctrl states described by pinctrl
+   names.
+ - atmel,panel: Should contain a phandle with 2 parameters.
+   The first cell is a phandle to a DRM panel device
+   The second cell encodes the RGB mode, which can take the following values:
+   * 0: RGB444
+   * 1: RGB565
+   * 2: RGB666
+   * 3: RGB888
+   The third cell encodes specific flags describing LCD signals configuration
+   (see Atmel's datasheet for a full description of these fields):
+   * bit 0: HSPOL: Horizontal Synchronization Pulse Polarity
+   * bit 1: VSPOL: Vertical Synchronization Pulse Polarity
+   * bit 2: VSPDLYS: Vertical Synchronization Pulse Start
+   * bit 3: VSPDLYE: Vertical Synchronization Pulse End
+   * bit 4: DISPPOL: Display Signal Polarity
+   * bit 7: DISPDLY: LCD Controller Display Power Signal Synchronization
+   * bit 12: VSPSU: LCD Controller Vertical synchronization Pulse Setup 
Configuration
+   * bit 13: VSPHO: LCD Controller Vertical synchronization Pulse Hold 
Configuration
+   * bit 16-20: GUARDTIME: LCD DISPLAY Guard Time
+
+Example:
+
+   hlcdc: hlcdc at f003 {
+   compatible = "atmel,sama5d3-hlcdc";
+   reg = <0xf003 0x2000>;
+   clocks = <_clk>, <>, <>;
+   clock-names = "periph_clk","sys_clk", "slow_clk";
+   status = "disabled";
+
+   hlcdc-display-controller {
+   compatible = "atmel,hlcdc-dc";
+   interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
+   pinctrl-names = "default", "rgb-444", "rgb-565", 
"rgb-666", "rgb-888";
+   pinctrl-0 = <_lcd_base>;
+   pinctrl-1 = <_lcd_base _lcd_rgb444>;
+   pinctrl-2 = <_lcd_base _lcd_rgb565>;
+   pinctrl-3 = <_lcd_base _lcd_rgb666>;
+   pinctrl-4 = <_lcd_base _lcd_rgb888>;
+   };
+
+   hlcdc_pwm: hlcdc-pwm {
+   compatible = "atmel,hlcdc-pwm";
+   pinctrl-names = "default";
+   pinctrl-0 = <_lcd_pwm>;
+   #pwm-cells = <3>;
+   };
+   };
-- 
1.8.3.2



[RESEND PATCH v3 05/11] drm: add Atmel HLCDC Display Controller support

2014-07-07 Thread Boris BREZILLON
The Atmel HLCDC (HLCD Controller) IP available on some Atmel SoCs (i.e.
at91sam9n12, at91sam9x5 family or sama5d3 family) provides a display
controller device.

This display controller supports at least one primary plane and might
provide several overlays and an hardware cursor depending on the IP
version.

At the moment, this driver only implements an RGB connector to interface
with LCD panels, but support for other kind of external devices (like DRM
bridges) might be added later.

Signed-off-by: Boris BREZILLON 
---
 drivers/gpu/drm/Kconfig |   2 +
 drivers/gpu/drm/Makefile|   1 +
 drivers/gpu/drm/atmel-hlcdc/Kconfig |  11 +
 drivers/gpu/drm/atmel-hlcdc/Makefile|   7 +
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c  | 469 +++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c| 474 +++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h| 210 +++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c | 706 +++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h | 422 ++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_panel.c | 351 
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 729 
 11 files changed, 3382 insertions(+)
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/Kconfig
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/Makefile
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_panel.c
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index d1cc2f6..df6f0c1 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -182,6 +182,8 @@ source "drivers/gpu/drm/cirrus/Kconfig"

 source "drivers/gpu/drm/armada/Kconfig"

+source "drivers/gpu/drm/atmel-hlcdc/Kconfig"
+
 source "drivers/gpu/drm/rcar-du/Kconfig"

 source "drivers/gpu/drm/shmobile/Kconfig"
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 48e38ba..28c8a61 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -54,6 +54,7 @@ obj-$(CONFIG_DRM_GMA500) += gma500/
 obj-$(CONFIG_DRM_UDL) += udl/
 obj-$(CONFIG_DRM_AST) += ast/
 obj-$(CONFIG_DRM_ARMADA) += armada/
+obj-$(CONFIG_DRM_ATMEL_HLCDC)  += atmel-hlcdc/
 obj-$(CONFIG_DRM_RCAR_DU) += rcar-du/
 obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/
 obj-$(CONFIG_DRM_OMAP) += omapdrm/
diff --git a/drivers/gpu/drm/atmel-hlcdc/Kconfig 
b/drivers/gpu/drm/atmel-hlcdc/Kconfig
new file mode 100644
index 000..bc07315
--- /dev/null
+++ b/drivers/gpu/drm/atmel-hlcdc/Kconfig
@@ -0,0 +1,11 @@
+config DRM_ATMEL_HLCDC
+   tristate "DRM Support for ATMEL HLCDC Display Controller"
+   depends on DRM && OF && MFD_ATMEL_HLCDC && COMMON_CLK
+   select DRM_GEM_CMA_HELPER
+   select DRM_KMS_HELPER
+   select DRM_KMS_FB_HELPER
+   select DRM_KMS_CMA_HELPER
+   select DRM_PANEL
+   help
+ Choose this option if you have an ATMEL SoC with an HLCDC display
+ controller (i.e. at91sam9n12, at91sam9x5 family or sama5d3 family).
diff --git a/drivers/gpu/drm/atmel-hlcdc/Makefile 
b/drivers/gpu/drm/atmel-hlcdc/Makefile
new file mode 100644
index 000..bf9fe0b
--- /dev/null
+++ b/drivers/gpu/drm/atmel-hlcdc/Makefile
@@ -0,0 +1,7 @@
+atmel-hlcdc-dc-y := atmel_hlcdc_crtc.o \
+   atmel_hlcdc_dc.o \
+   atmel_hlcdc_layer.o \
+   atmel_hlcdc_panel.o \
+   atmel_hlcdc_plane.o
+
+obj-$(CONFIG_DRM_ATMEL_HLCDC)  += atmel-hlcdc-dc.o
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c 
b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
new file mode 100644
index 000..8b11af8
--- /dev/null
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
@@ -0,0 +1,469 @@
+/*
+ * Copyright (C) 2014 Traphandler
+ * Copyright (C) 2014 Free Electrons
+ *
+ * Author: Jean-Jacques Hiblot 
+ * Author: Boris BREZILLON 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see .
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+#include "atmel_hlcdc_dc.h"
+
+/**
+ * Structure storing HW 

[RESEND PATCH v3 04/11] pwm: add DT bindings documentation for atmel-hlcdc-pwm driver

2014-07-07 Thread Boris BREZILLON
The HLCDC IP available in some Atmel SoCs (i.e. sam9x5i.e. at91sam9n12,
at91sam9x5 family or sama5d3 family) provide a PWM device.

The DT bindings used for this PWM device is following the default 3 cells
bindings described in Documentation/devicetree/bindings/pwm/pwm.txt.

Signed-off-by: Boris BREZILLON 
---
 .../devicetree/bindings/pwm/atmel-hlcdc-pwm.txt| 46 ++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt

diff --git a/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt 
b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
new file mode 100644
index 000..d5fff47
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
@@ -0,0 +1,46 @@
+Device-Tree bindings for Atmel's HLCDC (High LCD Controller) PWM driver
+
+The Atmel HLCDC PWM is subdevice of the HLCDC MFD device.
+See Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt for more details.
+
+Required properties:
+ - compatible: value should be one of the following:
+   "atmel,hlcdc-pwm"
+ - pinctr-names: the pin control state names. Should contain "default".
+ - pinctrl-0: should contain the pinctrl states described by pinctrl
+   default.
+ - #pwm-cells: should be set to 3. This PWM chip use the default 3 cells
+   bindings defined in Documentation/devicetree/bindings/pwm/pwm.txt.
+   The first cell encodes the PWM id (0 is the only acceptable value here,
+   because the chip only provide one PWM).
+   The second cell encodes the PWM period in nanoseconds.
+   The third cell encodes the PWM flags (the only supported flag is
+   PWM_POLARITY_INVERTED)
+
+Example:
+
+   hlcdc: hlcdc at f003 {
+   compatible = "atmel,sama5d3-hlcdc";
+   reg = <0xf003 0x2000>;
+   clocks = <_clk>, <>, <>;
+   clock-names = "periph_clk","sys_clk", "slow_clk";
+   status = "disabled";
+
+   hlcdc-display-controller {
+   compatible = "atmel,hlcdc-dc";
+   interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
+   pinctrl-names = "default", "rgb-444", "rgb-565", 
"rgb-666", "rgb-888";
+   pinctrl-0 = <_lcd_base>;
+   pinctrl-1 = <_lcd_base _lcd_rgb444>;
+   pinctrl-2 = <_lcd_base _lcd_rgb565>;
+   pinctrl-3 = <_lcd_base _lcd_rgb666>;
+   pinctrl-4 = <_lcd_base _lcd_rgb888>;
+   };
+
+   hlcdc_pwm: hlcdc-pwm {
+   compatible = "atmel,hlcdc-pwm";
+   pinctrl-names = "default";
+   pinctrl-0 = <_lcd_pwm>;
+   #pwm-cells = <3>;
+   };
+   };
-- 
1.8.3.2



[RESEND PATCH v3 03/11] pwm: add support for atmel-hlcdc-pwm device

2014-07-07 Thread Boris BREZILLON
The HLCDC IP available in some Atmel SoCs (i.e. sam9x5i.e. at91sam9n12,
at91sam9x5 family or sama5d3 family) provide a PWM device.

This driver add support for a PWM chip exposing a single PWM device (which
will most likely be used to drive a backlight device).

Signed-off-by: Boris BREZILLON 
---
 drivers/pwm/Kconfig   |   9 ++
 drivers/pwm/Makefile  |   1 +
 drivers/pwm/pwm-atmel-hlcdc.c | 229 ++
 3 files changed, 239 insertions(+)
 create mode 100644 drivers/pwm/pwm-atmel-hlcdc.c

diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 5b34ff2..7186242 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -50,6 +50,15 @@ config PWM_ATMEL
  To compile this driver as a module, choose M here: the module
  will be called pwm-atmel.

+config PWM_ATMEL_HLCDC_PWM
+   tristate "Atmel HLCDC PWM support"
+   depends on MFD_ATMEL_HLCDC
+   help
+ Generic PWM framework driver for Atmel HLCDC PWM.
+
+ To compile this driver as a module, choose M here: the module
+ will be called pwm-atmel.
+
 config PWM_ATMEL_TCB
tristate "Atmel TC Block PWM support"
depends on ATMEL_TCLIB && OF
diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
index e57d2c3..a245519 100644
--- a/drivers/pwm/Makefile
+++ b/drivers/pwm/Makefile
@@ -2,6 +2,7 @@ obj-$(CONFIG_PWM)   += core.o
 obj-$(CONFIG_PWM_SYSFS)+= sysfs.o
 obj-$(CONFIG_PWM_AB8500)   += pwm-ab8500.o
 obj-$(CONFIG_PWM_ATMEL)+= pwm-atmel.o
+obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM)  += pwm-atmel-hlcdc.o
 obj-$(CONFIG_PWM_ATMEL_TCB)+= pwm-atmel-tcb.o
 obj-$(CONFIG_PWM_BFIN) += pwm-bfin.o
 obj-$(CONFIG_PWM_CLPS711X) += pwm-clps711x.o
diff --git a/drivers/pwm/pwm-atmel-hlcdc.c b/drivers/pwm/pwm-atmel-hlcdc.c
new file mode 100644
index 000..7f25197
--- /dev/null
+++ b/drivers/pwm/pwm-atmel-hlcdc.c
@@ -0,0 +1,229 @@
+/*
+ * Copyright (C) 2014 Free Electrons
+ * Copyright (C) 2014 Atmel
+ *
+ * Author: Boris BREZILLON 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see .
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define ATMEL_HLCDC_PWMCVAL_MASK   GENMASK(15, 8)
+#define ATMEL_HLCDC_PWMCVAL(x) ((x << 8) & ATMEL_HLCDC_PWMCVAL_MASK)
+#define ATMEL_HLCDC_PWMPOL BIT(4)
+#define ATMEL_HLCDC_PWMPS_MASK GENMASK(2, 0)
+#define ATMEL_HLCDC_PWMPS_MAX  0x6
+#define ATMEL_HLCDC_PWMPS(x)   ((x) & ATMEL_HLCDC_PWMPS_MASK)
+
+struct atmel_hlcdc_pwm_chip {
+   struct pwm_chip chip;
+   struct atmel_hlcdc *hlcdc;
+   struct clk *cur_clk;
+};
+
+static inline struct atmel_hlcdc_pwm_chip *
+pwm_chip_to_atmel_hlcdc_pwm_chip(struct pwm_chip *chip)
+{
+   return container_of(chip, struct atmel_hlcdc_pwm_chip, chip);
+}
+
+static int atmel_hlcdc_pwm_config(struct pwm_chip *c,
+ struct pwm_device *pwm,
+ int duty_ns, int period_ns)
+{
+   struct atmel_hlcdc_pwm_chip *chip =
+   pwm_chip_to_atmel_hlcdc_pwm_chip(c);
+   struct atmel_hlcdc *hlcdc = chip->hlcdc;
+   struct clk *new_clk = hlcdc->slow_clk;
+   u64 pwmcval = duty_ns * 256;
+   unsigned long clk_freq;
+   u64 clk_period_ns;
+   u32 pwmcfg;
+   int pres;
+
+   clk_freq = clk_get_rate(new_clk);
+   clk_period_ns = 10;
+   clk_period_ns *= 256;
+   do_div(clk_period_ns, clk_freq);
+
+   if (clk_period_ns > period_ns) {
+   new_clk = hlcdc->sys_clk;
+   clk_freq = clk_get_rate(new_clk);
+   clk_period_ns = 10;
+   clk_period_ns *= 256;
+   do_div(clk_period_ns, clk_freq);
+   }
+
+   for (pres = ATMEL_HLCDC_PWMPS_MAX; pres >= 0; pres--) {
+   if ((clk_period_ns << pres) <= period_ns)
+   break;
+   }
+
+   if (pres > ATMEL_HLCDC_PWMPS_MAX)
+   return -EINVAL;
+
+   pwmcfg = ATMEL_HLCDC_PWMPS(pres);
+
+   if (new_clk != chip->cur_clk) {
+   u32 gencfg = 0;
+
+   clk_prepare_enable(new_clk);
+   clk_disable_unprepare(chip->cur_clk);
+   chip->cur_clk = new_clk;
+
+   if (new_clk != hlcdc->slow_clk)
+   gencfg = ATMEL_HLCDC_CLKPWMSEL;
+   

[RESEND PATCH v3 02/11] mfd: add documentation for atmel-hlcdc DT bindings

2014-07-07 Thread Boris BREZILLON
The HLCDC IP available on some Atmel SoCs (i.e. at91sam9n12, at91sam9x5
family or sama5d3 family) exposes 2 subdevices:
- a display controller (controlled by a DRM driver)
- a PWM chip

This patch adds documentation for atmel-hlcdc DT bindings.

Signed-off-by: Boris BREZILLON 
---
 .../devicetree/bindings/mfd/atmel-hlcdc.txt| 40 ++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt

diff --git a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt 
b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt
new file mode 100644
index 000..294048a
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt
@@ -0,0 +1,40 @@
+Device-Tree bindings for Atmel's HLCDC (High LCD Controller) MFD driver
+
+Required properties:
+ - compatible: value should be one of the following:
+   "atmel,sama5d3-hlcdc"
+ - reg: base address and size of the HLCDC device registers.
+ - clock-names: the name of the 3 clocks requested by the HLCDC device.
+   Should contain "periph_clk", "sys_clk" and "slow_clk".
+ - clocks: should contain the 3 clocks requested by the HLCDC device.
+
+The HLCDC IP exposes two subdevices:
+ - a PWM chip: see Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
+ - a Display Controller: see 
Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt
+
+Example:
+
+   hlcdc: hlcdc at f003 {
+   compatible = "atmel,sama5d3-hlcdc";
+   reg = <0xf003 0x2000>;
+   clocks = <_clk>, <>, <>;
+   clock-names = "periph_clk","sys_clk", "slow_clk";
+
+   hlcdc-display-controller {
+   compatible = "atmel,hlcdc-dc";
+   interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
+   pinctrl-names = "default", "rgb-444", "rgb-565", 
"rgb-666", "rgb-888";
+   pinctrl-0 = <_lcd_base>;
+   pinctrl-1 = <_lcd_base _lcd_rgb444>;
+   pinctrl-2 = <_lcd_base _lcd_rgb565>;
+   pinctrl-3 = <_lcd_base _lcd_rgb666>;
+   pinctrl-4 = <_lcd_base _lcd_rgb888>;
+   };
+
+   hlcdc_pwm: hlcdc-pwm {
+   compatible = "atmel,hlcdc-pwm";
+   pinctrl-names = "default";
+   pinctrl-0 = <_lcd_pwm>;
+   #pwm-cells = <3>;
+   };
+   };
-- 
1.8.3.2



[RESEND PATCH v3 01/11] mfd: add atmel-hlcdc driver

2014-07-07 Thread Boris BREZILLON
The HLCDC IP available on some Atmel SoCs (i.e. at91sam9n12, at91sam9x5
family or sama5d3 family) exposes 2 subdevices:
- a display controller (controlled by a DRM driver)
- a PWM chip

The MFD device provides a regmap and several clocks (those connected
to this hardware block) to its subdevices.

This way concurrent accesses to the iomem range are handled by the regmap
framework, and each subdevice can safely access HLCDC registers.

Signed-off-by: Boris BREZILLON 
---
 drivers/mfd/Kconfig |  12 
 drivers/mfd/Makefile|   1 +
 drivers/mfd/atmel-hlcdc.c   | 119 
 include/linux/mfd/atmel-hlcdc.h |  78 ++
 4 files changed, 210 insertions(+)
 create mode 100644 drivers/mfd/atmel-hlcdc.c
 create mode 100644 include/linux/mfd/atmel-hlcdc.h

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index ee8204c..75e674f 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -59,6 +59,18 @@ config MFD_AAT2870_CORE
  additional drivers must be enabled in order to use the
  functionality of the device.

+config MFD_ATMEL_HLCDC
+   tristate "Atmel HLCDC (HLCD Controller)"
+   select MFD_CORE
+   select REGMAP_MMIO
+   depends on OF
+   help
+ Choose this option if you have an ATMEL SoC with an HLCDC (HLCD
+ Controller) IP (i.e. at91sam9n12, at91sam9x5 family or sama5d3
+ family).
+ This MFD device exposes two subdevices: a PWM chip and a Display
+ Controller.
+
 config MFD_BCM590XX
tristate "Broadcom BCM590xx PMUs"
select MFD_CORE
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 8afedba..5f25b0d 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -156,6 +156,7 @@ obj-$(CONFIG_MFD_PM8921_CORE)   += pm8921-core.o ssbi.o
 obj-$(CONFIG_TPS65911_COMPARATOR)  += tps65911-comparator.o
 obj-$(CONFIG_MFD_TPS65090) += tps65090.o
 obj-$(CONFIG_MFD_AAT2870_CORE) += aat2870-core.o
+obj-$(CONFIG_MFD_ATMEL_HLCDC)  += atmel-hlcdc.o
 obj-$(CONFIG_MFD_INTEL_MSIC)   += intel_msic.o
 obj-$(CONFIG_MFD_PALMAS)   += palmas.o
 obj-$(CONFIG_MFD_VIPERBOARD)+= viperboard.o
diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c
new file mode 100644
index 000..381dd06
--- /dev/null
+++ b/drivers/mfd/atmel-hlcdc.c
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2014 Free Electrons
+ * Copyright (C) 2014 Atmel
+ *
+ * Author: Boris BREZILLON 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see .
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define ATMEL_HLCDC_REG_MAX(0x4000 - 0x4)
+
+static const struct mfd_cell atmel_hlcdc_cells[] = {
+   {
+   .name = "atmel-hlcdc-pwm",
+   .of_compatible = "atmel,hlcdc-pwm",
+   },
+   {
+   .name = "atmel-hlcdc-dc",
+   .of_compatible = "atmel,hlcdc-dc",
+   },
+};
+
+static const struct regmap_config atmel_hlcdc_regmap_config = {
+   .reg_bits = 32,
+   .val_bits = 32,
+   .reg_stride = 4,
+   .max_register = ATMEL_HLCDC_REG_MAX,
+};
+
+static int atmel_hlcdc_probe(struct platform_device *pdev)
+{
+   struct device *dev = >dev;
+   struct atmel_hlcdc *hlcdc;
+   struct resource *res;
+   void __iomem *regs;
+
+   hlcdc = devm_kzalloc(dev, sizeof(*hlcdc), GFP_KERNEL);
+   if (!hlcdc)
+   return -ENOMEM;
+
+   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+   regs = devm_ioremap_resource(dev, res);
+   if (IS_ERR(regs))
+   return PTR_ERR(regs);
+
+   hlcdc->periph_clk = devm_clk_get(dev, "periph_clk");
+   if (IS_ERR(hlcdc->periph_clk)) {
+   dev_err(dev, "failed to get peripheral clock\n");
+   return PTR_ERR(hlcdc->periph_clk);
+   }
+
+   hlcdc->sys_clk = devm_clk_get(dev, "sys_clk");
+   if (IS_ERR(hlcdc->sys_clk)) {
+   dev_err(dev, "failed to get system clock\n");
+   return PTR_ERR(hlcdc->sys_clk);
+   }
+
+   hlcdc->slow_clk = devm_clk_get(dev, "slow_clk");
+   if (IS_ERR(hlcdc->slow_clk)) {
+   dev_err(dev, "failed to get slow clock\n");
+   return PTR_ERR(hlcdc->slow_clk);
+   }
+
+   hlcdc->regmap = devm_regmap_init_mmio(dev, regs,
+ _hlcdc_regmap_config);
+   if 

[RESEND PATCH v3 00/11] drm: add support for Atmel HLCDC Display Controller

2014-07-07 Thread Boris BREZILLON
Hello,

Sorry for the noise, but I forgot to add the LAKML in Cc.

This patch series adds support for Atmel HLCDC (HLCD Controller) available
on some Atmel SoCs (i.e. the sama5d3 family).

The first two versions of this series didn't receive any reviews from DRM
maintainers or experienced DRM developers.
Anyway, I hope I'll get some feedback on this version.

The HLCDC actually provides a Display Controller and a PWM device, hence I
decided to declare an MFD device exposing 2 subdevices: a display
controller and a PWM chip.
This also solves a circular dependency issue preventing HLCDC driver from
unloading.
The HLCDC request a drm_panel device, which request a backlight device
(a PWM backlight), which depends on a PWM which is provided by the HLCDC
driver (hlcdc -> panel -> backlight -> hlcdc (pwm part)).

The current implementation only supports sama5d3 SoCs but other SoCs should
be easily ported by defining new compatible strings and adding HLCDC
description structures for these SoCs.

The drivers supports basic CRTC functionalities, several overlays and an
hardware cursor.

At the moment, it only supports connection to LCD panels through an RGB
connector (defined as an LVDS connector in my implementation), though
connection to other kind of devices (like DRM bridges) can be added later.

It also supports several RGB format on all planes and some YUV formats on
the HEO overlay plane.

Best Regards,

Boris

Changes since v2:
- fix coding style issues (macro indentation)
- make use of GENMASK in several places
- declare regmap config as a static structure
- rework hlcdc plane update API
- rework cursor handling to make use of the new plane update API
- fix backporch config
- do not use devm_regmap_init_mmio_clk to avoid extra clk_enable
  clk disable calls when accessing registers
- explicitely include regmap and clk headers instead of relying on
  atmel-hlcdc.h inclusions
- make the atmel-hlcdc driver depends on CONFIG_OF
- separate DT bindings documentation from driver implementation
- support several pin muxing for HLCDC pins on sama5d3 SoCs

Changes since v1:
- replace the backlight driver by a PWM driver
- make use of drm_panel infrastructure
- split driver code in several subsystem: MFD, PWM and DRM
- add support for overlays
- add support for hardware cursor


Boris BREZILLON (11):
  mfd: add atmel-hlcdc driver
  mfd: add documentation for atmel-hlcdc DT bindings
  pwm: add support for atmel-hlcdc-pwm device
  pwm: add DT bindings documentation for atmel-hlcdc-pwm driver
  drm: add Atmel HLCDC Display Controller support
  drm: add DT bindings documentation for atmel-hlcdc-dc driver
  ARM: AT91/dt: split sama5d3 lcd pin definitions to match RGB mode
configs
  ARM: AT91/dt: add alternative pin muxing for sama5d3 lcd pins
  ARM: at91/dt: define the HLCDC node available on sama5d3 SoCs
  ARM: at91/dt: add LCD panel description to sama5d3xdm.dtsi
  ARM: at91/dt: enable the LCD panel on sama5d3xek boards

 .../devicetree/bindings/drm/atmel-hlcdc-dc.txt |  59 ++
 .../devicetree/bindings/mfd/atmel-hlcdc.txt|  40 ++
 .../devicetree/bindings/pwm/atmel-hlcdc-pwm.txt|  46 ++
 arch/arm/boot/dts/sama5d31ek.dts   |  24 +
 arch/arm/boot/dts/sama5d33ek.dts   |  24 +
 arch/arm/boot/dts/sama5d34ek.dts   |  24 +
 arch/arm/boot/dts/sama5d36ek.dts   |  24 +
 arch/arm/boot/dts/sama5d3_lcd.dtsi | 197 +-
 arch/arm/boot/dts/sama5d3xdm.dtsi  |  43 ++
 drivers/gpu/drm/Kconfig|   2 +
 drivers/gpu/drm/Makefile   |   1 +
 drivers/gpu/drm/atmel-hlcdc/Kconfig|  11 +
 drivers/gpu/drm/atmel-hlcdc/Makefile   |   7 +
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 469 +
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c   | 474 ++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h   | 210 ++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c| 706 
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h| 422 
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_panel.c| 351 ++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c| 729 +
 drivers/mfd/Kconfig|  12 +
 drivers/mfd/Makefile   |   1 +
 drivers/mfd/atmel-hlcdc.c  | 119 
 drivers/pwm/Kconfig|   9 +
 drivers/pwm/Makefile   |   1 +
 drivers/pwm/pwm-atmel-hlcdc.c  | 229 +++
 include/linux/mfd/atmel-hlcdc.h|  78 +++
 27 files changed, 4281 insertions(+), 31 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
 create mode 100644 

[Bug 79591] possible circular locking dependency detected

2014-07-07 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=79591

--- Comment #2 from Stefan Ringel  ---
and witch bugtracker is it?

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


[PATCH] drm: Remove command line guard for render nodes (v2)

2014-07-07 Thread Alex Deucher
On Mon, Jul 7, 2014 at 6:20 PM, David Herrmann  wrote:
> Hi
>
> On Tue, Jul 8, 2014 at 12:10 AM, Alex Deucher  
> wrote:
>> Render nodes are ready to leave the experimental state so
>> drop the kernel command line parameter which was hiding them
>> by default.  I swore we had already enabled these by default,
>> that appears to not be the case.
>>
>> v2: remove rnodes parameter description
>>
>> Signed-off-by: Alex Deucher 
>
> For completeness:
> You still missed the line in drmP.h. I have it queued in my -next branch [1].
>

Thanks!  Feel free to add my Acked-by.

Alex

> Thanks
> David
>
> [1] 
> http://cgit.freedesktop.org/~dvdhrm/linux/commit/?h=drm-next=c006394362a28e4949046cd0ce1fbc568e914861
>
>> ---
>>  drivers/gpu/drm/drm_stub.c | 7 +--
>>  1 file changed, 1 insertion(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
>> index 14d1646..07bf701 100644
>> --- a/drivers/gpu/drm/drm_stub.c
>> +++ b/drivers/gpu/drm/drm_stub.c
>> @@ -37,9 +37,6 @@
>>  unsigned int drm_debug = 0;/* 1 to enable debug output */
>>  EXPORT_SYMBOL(drm_debug);
>>
>> -unsigned int drm_rnodes = 0;   /* 1 to enable experimental render nodes API 
>> */
>> -EXPORT_SYMBOL(drm_rnodes);
>> -
>>  /* 1 to allow user space to request universal planes (experimental) */
>>  unsigned int drm_universal_planes = 0;
>>  EXPORT_SYMBOL(drm_universal_planes);
>> @@ -60,13 +57,11 @@ MODULE_AUTHOR(CORE_AUTHOR);
>>  MODULE_DESCRIPTION(CORE_DESC);
>>  MODULE_LICENSE("GPL and additional rights");
>>  MODULE_PARM_DESC(debug, "Enable debug output");
>> -MODULE_PARM_DESC(rnodes, "Enable experimental render nodes API");
>>  MODULE_PARM_DESC(vblankoffdelay, "Delay until vblank irq auto-disable 
>> [msecs]");
>>  MODULE_PARM_DESC(timestamp_precision_usec, "Max. error on timestamps 
>> [usecs]");
>>  MODULE_PARM_DESC(timestamp_monotonic, "Use monotonic timestamps");
>>
>>  module_param_named(debug, drm_debug, int, 0600);
>> -module_param_named(rnodes, drm_rnodes, int, 0600);
>>  module_param_named(universal_planes, drm_universal_planes, int, 0600);
>>  module_param_named(vblankoffdelay, drm_vblank_offdelay, int, 0600);
>>  module_param_named(timestamp_precision_usec, drm_timestamp_precision, int, 
>> 0600);
>> @@ -588,7 +583,7 @@ struct drm_device *drm_dev_alloc(struct drm_driver 
>> *driver,
>> goto err_minors;
>> }
>>
>> -   if (drm_core_check_feature(dev, DRIVER_RENDER) && drm_rnodes) {
>> +   if (drm_core_check_feature(dev, DRIVER_RENDER)) {
>> ret = drm_minor_alloc(dev, DRM_MINOR_RENDER);
>> if (ret)
>> goto err_minors;
>> --
>> 1.8.3.1
>>
>> ___
>> dri-devel mailing list
>> dri-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 79591] possible circular locking dependency detected

2014-07-07 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=79591

Martin Peres  changed:

   What|Removed |Added

 CC||martin.peres at free.fr

--- Comment #1 from Martin Peres  ---
Thanks for reporting. I'll have a look at it during the week!

Please do not report Nouveau bugs to the kernel's bugtracker. We have our own
which we monitor much more attentively.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


[PATCH] drm: Remove command line guard for render nodes (v2)

2014-07-07 Thread Alex Deucher
Render nodes are ready to leave the experimental state so
drop the kernel command line parameter which was hiding them
by default.  I swore we had already enabled these by default,
that appears to not be the case.

v2: remove rnodes parameter description

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/drm_stub.c | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 14d1646..07bf701 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -37,9 +37,6 @@
 unsigned int drm_debug = 0;/* 1 to enable debug output */
 EXPORT_SYMBOL(drm_debug);

-unsigned int drm_rnodes = 0;   /* 1 to enable experimental render nodes API */
-EXPORT_SYMBOL(drm_rnodes);
-
 /* 1 to allow user space to request universal planes (experimental) */
 unsigned int drm_universal_planes = 0;
 EXPORT_SYMBOL(drm_universal_planes);
@@ -60,13 +57,11 @@ MODULE_AUTHOR(CORE_AUTHOR);
 MODULE_DESCRIPTION(CORE_DESC);
 MODULE_LICENSE("GPL and additional rights");
 MODULE_PARM_DESC(debug, "Enable debug output");
-MODULE_PARM_DESC(rnodes, "Enable experimental render nodes API");
 MODULE_PARM_DESC(vblankoffdelay, "Delay until vblank irq auto-disable 
[msecs]");
 MODULE_PARM_DESC(timestamp_precision_usec, "Max. error on timestamps [usecs]");
 MODULE_PARM_DESC(timestamp_monotonic, "Use monotonic timestamps");

 module_param_named(debug, drm_debug, int, 0600);
-module_param_named(rnodes, drm_rnodes, int, 0600);
 module_param_named(universal_planes, drm_universal_planes, int, 0600);
 module_param_named(vblankoffdelay, drm_vblank_offdelay, int, 0600);
 module_param_named(timestamp_precision_usec, drm_timestamp_precision, int, 
0600);
@@ -588,7 +583,7 @@ struct drm_device *drm_dev_alloc(struct drm_driver *driver,
goto err_minors;
}

-   if (drm_core_check_feature(dev, DRIVER_RENDER) && drm_rnodes) {
+   if (drm_core_check_feature(dev, DRIVER_RENDER)) {
ret = drm_minor_alloc(dev, DRM_MINOR_RENDER);
if (ret)
goto err_minors;
-- 
1.8.3.1



[PATCH] drm/i2c: tda998x: Remove useless test

2014-07-07 Thread Jean-Francois Moine
In tda998x_encoder_destroy(), priv->cec is never NULL, so,
remove its test.

Signed-off-by: Jean-Francois Moine 
---
 drivers/gpu/drm/i2c/tda998x_drv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c 
b/drivers/gpu/drm/i2c/tda998x_drv.c
index ac357b0..a8f1e03 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -1196,8 +1196,7 @@ tda998x_encoder_destroy(struct drm_encoder *encoder)
if (priv->hdmi->irq)
free_irq(priv->hdmi->irq, priv);

-   if (priv->cec)
-   i2c_unregister_device(priv->cec);
+   i2c_unregister_device(priv->cec);
drm_i2c_encoder_destroy(encoder);
kfree(priv);
 }
-- 
2.0.1


drm/i2c: tda998x: use irq for connection status and EDID read

2014-07-07 Thread Jean-Francois Moine
On Mon, 7 Jul 2014 17:22:03 +0300
Dan Carpenter  wrote:

> The patch 12473b7d8e60: "drm/i2c: tda998x: use irq for connection
> status and EDID read" from Jan 25, 2014, leads to the following
> static checker warning:
> 
>   drivers/gpu/drm/i2c/tda998x_drv.c:1199 tda998x_encoder_destroy()
>   warn: variable dereferenced before check 'priv->cec' (see line 1194)
> 
> drivers/gpu/drm/i2c/tda998x_drv.c
>   1188  static void
>   1189  tda998x_encoder_destroy(struct drm_encoder *encoder)
>   1190  {
>   1191  struct tda998x_priv *priv = to_tda998x_priv(encoder);
>   1192  
>   1193  /* disable all IRQs and free the IRQ handler */
>   1194  cec_write(priv, REG_CEC_RXSHPDINTENA, 0);
> ^^
> We dereference priv->cec inside the call to cec_write().
> 
>   1195  reg_clear(priv, REG_INT_FLAGS_2, INT_FLAGS_2_EDID_BLK_RD);
>   1196  if (priv->hdmi->irq)
>   1197  free_irq(priv->hdmi->irq, priv);
>   1198  
>   1199  if (priv->cec)
> ^
> But later in the function we assume that ->cec can be NULL.
> 
>   1200  i2c_unregister_device(priv->cec);
>   1201  drm_i2c_encoder_destroy(encoder);
>   1202  kfree(priv);
>   1203  }

Yes, priv->cec is never NULL.

Thanks.

-- 
Ken ar c'henta? | ** Breizh ha Linux atav! **
Jef |   http://moinejf.free.fr/


[Bug 21239] progs/tests/afsmultiarb : incorrect rendering

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=21239

--- Comment #7 from Roland Scheidegger  ---
>From the description it sounds like it was actually not a problem with r200,
just swrast...

-- 
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/20140707/3d605be7/attachment.html>


Brightness too high on internal AMD/ATI graphics device, but fine with external AMD/ATI graphics card

2014-07-07 Thread Alex Deucher
On Sat, Jul 5, 2014 at 3:42 AM, Paul Menzel
 wrote:
> Dear Linux folks,
>
>
> connecting a VGA monitor to the internal graphics device of the ASRock
> E350M1 [1], the brightness is much too high.
>
> $ lspci -tvnn
> [?]
> +-01.0  Advanced Micro Devices [AMD] nee ATI Wrestler [Radeon HD 
> 6310] [1002:9802]
> +-01.1  Advanced Micro Devices [AMD] nee ATI Wrestler HDMI Audio 
> [Radeon HD 6250/6310] [1002:1314]
> [?]
>
> Plugging in an external AMD/ATI graphics card and connecting the VGA
> monitor there, the brightness is normal as expected.
>
> $ lspci -nn
> [?]
> 01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, 
> Inc. [AMD/ATI] Cedar [Radeon HD 5000/6000/7350/8350 Series] [1002:68f9]
> 01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] 
> Cedar HDMI Audio [Radeon HD 5400/6300 Series] [1002:aa68]
> [?]
>
> The software stack is the same. Any idea how I can configure or debug
> that? This has been verified with 3.2.x to 3.14.9.

It sounds like the DAC bg/adj values are wrong on that board (they are
tuned on a per board basis and stored in the bios).  You might try a
bios upgrade on the board if there is one available.  If not, please
file a bug (https://bugs.freedesktop.org) and attach a copy of your
dmesg output, the vbios from the problematic board, and if possible
the output of `radeonreg regs dce4`.

To get a copy of your vbios:
(as root)
(use lspci to get the bus id)
cd /sys/bus/pci/devices/
echo 1 > rom
cat rom > /tmp/vbios.rom
echo 0 > rom

You can get radeonreg here:
http://cgit.freedesktop.org/~airlied/radeontool/

Alex


[PATCH] drm/radeon: only print meaningful VM faults

2014-07-07 Thread Alex Deucher
On Mon, Jul 7, 2014 at 5:16 AM, Christian K?nig  
wrote:
> From: Christian K?nig 
>
> Signed-off-by: Christian K?nig 


Applied to my -fixes tree.

Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/cik.c   | 6 --
>  drivers/gpu/drm/radeon/evergreen.c | 6 --
>  drivers/gpu/drm/radeon/si.c| 6 --
>  3 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
> index dcd4518..0b24711 100644
> --- a/drivers/gpu/drm/radeon/cik.c
> +++ b/drivers/gpu/drm/radeon/cik.c
> @@ -7676,14 +7676,16 @@ restart_ih:
> addr = RREG32(VM_CONTEXT1_PROTECTION_FAULT_ADDR);
> status = RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS);
> mc_client = 
> RREG32(VM_CONTEXT1_PROTECTION_FAULT_MCCLIENT);
> +   /* reset addr and status */
> +   WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
> +   if (addr == 0x0 && status == 0x0)
> +   break;
> dev_err(rdev->dev, "GPU fault detected: %d 0x%08x\n", 
> src_id, src_data);
> dev_err(rdev->dev, "  
> VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x%08X\n",
> addr);
> dev_err(rdev->dev, "  
> VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
> status);
> cik_vm_decode_fault(rdev, status, addr, mc_client);
> -   /* reset addr and status */
> -   WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
> break;
> case 167: /* VCE */
> DRM_DEBUG("IH: VCE int: 0x%08x\n", src_data);
> diff --git a/drivers/gpu/drm/radeon/evergreen.c 
> b/drivers/gpu/drm/radeon/evergreen.c
> index e2f6052..d5d4d3a 100644
> --- a/drivers/gpu/drm/radeon/evergreen.c
> +++ b/drivers/gpu/drm/radeon/evergreen.c
> @@ -5066,14 +5066,16 @@ restart_ih:
> case 147:
> addr = RREG32(VM_CONTEXT1_PROTECTION_FAULT_ADDR);
> status = RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS);
> +   /* reset addr and status */
> +   WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
> +   if (addr == 0x0 && status == 0x0)
> +   break;
> dev_err(rdev->dev, "GPU fault detected: %d 0x%08x\n", 
> src_id, src_data);
> dev_err(rdev->dev, "  
> VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x%08X\n",
> addr);
> dev_err(rdev->dev, "  
> VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
> status);
> cayman_vm_decode_fault(rdev, status, addr);
> -   /* reset addr and status */
> -   WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
> break;
> case 176: /* CP_INT in ring buffer */
> case 177: /* CP_INT in IB1 */
> diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
> index 730cee2..eba0225 100644
> --- a/drivers/gpu/drm/radeon/si.c
> +++ b/drivers/gpu/drm/radeon/si.c
> @@ -6376,14 +6376,16 @@ restart_ih:
> case 147:
> addr = RREG32(VM_CONTEXT1_PROTECTION_FAULT_ADDR);
> status = RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS);
> +   /* reset addr and status */
> +   WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
> +   if (addr == 0x0 && status == 0x0)
> +   break;
> dev_err(rdev->dev, "GPU fault detected: %d 0x%08x\n", 
> src_id, src_data);
> dev_err(rdev->dev, "  
> VM_CONTEXT1_PROTECTION_FAULT_ADDR   0x%08X\n",
> addr);
> dev_err(rdev->dev, "  
> VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
> status);
> si_vm_decode_fault(rdev, status, addr);
> -   /* reset addr and status */
> -   WREG32_P(VM_CONTEXT1_CNTL2, 1, ~1);
> break;
> case 176: /* RINGID0 CP_INT */
> radeon_fence_process(rdev, 
> RADEON_RING_TYPE_GFX_INDEX);
> --
> 1.9.1
>
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm: Remove command line guard for render nodes

2014-07-07 Thread Alex Deucher
Render nodes are ready to leave the experimental state so
drop the kernel command line parameter which was hiding them
by default.  I swore we had already enabled these by default,
that appears to not be the case.

Signed-off-by: Alex Deucher 
---
 drivers/gpu/drm/drm_stub.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index 14d1646..0df920b 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -37,9 +37,6 @@
 unsigned int drm_debug = 0;/* 1 to enable debug output */
 EXPORT_SYMBOL(drm_debug);

-unsigned int drm_rnodes = 0;   /* 1 to enable experimental render nodes API */
-EXPORT_SYMBOL(drm_rnodes);
-
 /* 1 to allow user space to request universal planes (experimental) */
 unsigned int drm_universal_planes = 0;
 EXPORT_SYMBOL(drm_universal_planes);
@@ -66,7 +63,6 @@ MODULE_PARM_DESC(timestamp_precision_usec, "Max. error on 
timestamps [usecs]");
 MODULE_PARM_DESC(timestamp_monotonic, "Use monotonic timestamps");

 module_param_named(debug, drm_debug, int, 0600);
-module_param_named(rnodes, drm_rnodes, int, 0600);
 module_param_named(universal_planes, drm_universal_planes, int, 0600);
 module_param_named(vblankoffdelay, drm_vblank_offdelay, int, 0600);
 module_param_named(timestamp_precision_usec, drm_timestamp_precision, int, 
0600);
@@ -588,7 +584,7 @@ struct drm_device *drm_dev_alloc(struct drm_driver *driver,
goto err_minors;
}

-   if (drm_core_check_feature(dev, DRIVER_RENDER) && drm_rnodes) {
+   if (drm_core_check_feature(dev, DRIVER_RENDER)) {
ret = drm_minor_alloc(dev, DRM_MINOR_RENDER);
if (ret)
goto err_minors;
-- 
1.8.3.1



drm/i2c: tda998x: use irq for connection status and EDID read

2014-07-07 Thread Dan Carpenter
Hello Jean-Francois Moine,

The patch 12473b7d8e60: "drm/i2c: tda998x: use irq for connection
status and EDID read" from Jan 25, 2014, leads to the following
static checker warning:

drivers/gpu/drm/i2c/tda998x_drv.c:1199 tda998x_encoder_destroy()
warn: variable dereferenced before check 'priv->cec' (see line 1194)

drivers/gpu/drm/i2c/tda998x_drv.c
  1188  static void
  1189  tda998x_encoder_destroy(struct drm_encoder *encoder)
  1190  {
  1191  struct tda998x_priv *priv = to_tda998x_priv(encoder);
  1192  
  1193  /* disable all IRQs and free the IRQ handler */
  1194  cec_write(priv, REG_CEC_RXSHPDINTENA, 0);
^^
We dereference priv->cec inside the call to cec_write().

  1195  reg_clear(priv, REG_INT_FLAGS_2, INT_FLAGS_2_EDID_BLK_RD);
  1196  if (priv->hdmi->irq)
  1197  free_irq(priv->hdmi->irq, priv);
  1198  
  1199  if (priv->cec)
^
But later in the function we assume that ->cec can be NULL.

  1200  i2c_unregister_device(priv->cec);
  1201  drm_i2c_encoder_destroy(encoder);
  1202  kfree(priv);
  1203  }

regards,
dan carpenter


[Bug 69723] GPU lockups with kernel 3.11.0 / 3.12-rc1 when dpm=1 on r600g (Cayman)

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=69723

Alexandre Demers  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #122 from Alexandre Demers  ---
Tested with kernel 3.16-RC4 (which includes the patch by commit
b0880e87c1fd038b84498944f52e52c3e86ebe59) and still working flawlessly. Closing
this bug. I'll reopen it if needed.

-- 
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/20140707/bfff32c1/attachment.html>


[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Paolo Bonzini
Il 07/07/2014 16:49, Daniel Vetter ha scritto:
> So the correct fix to forward intel gpus to guests is indeed to somehow
> fake the pch pci ids since the driver really needs them. Gross design, but
> that's how the hardware works.

A way that could work for virtualization is this: if you find the card 
has a magic subsystem vendor id, fetch the subsystem device id and use 
_that_ as the PCH device id.

Would that work for you?

Paolo


linux-next: Tree for Jun 19 (drm/i915)

2014-07-07 Thread Daniel Vetter
On Wed, Jun 25, 2014 at 01:01:36AM +0200, Rafael J. Wysocki wrote:
> On Tuesday, June 24, 2014 02:43:02 PM Jani Nikula wrote:
> > On Thu, 19 Jun 2014, Randy Dunlap  wrote:
> > > On 06/18/14 23:16, Stephen Rothwell wrote:
> > >> Hi all,
> > >> 
> > >> The powerpc allyesconfig is again broken more than usual.
> > >> 
> > >> Changes since 20140618:
> > >> 
> > >
> > > on i386:
> > >
> > > CONFIG_ACPI is not enabled.
> > >
> > >   CC  drivers/gpu/drm/i915/i915_drv.o
> > > ../drivers/gpu/drm/i915/i915_drv.c: In function 'i915_drm_freeze':
> > > ../drivers/gpu/drm/i915/i915_drv.c:547:2: error: implicit declaration of 
> > > function 'acpi_target_system_state' 
> > > [-Werror=implicit-function-declaration]
> > > ../drivers/gpu/drm/i915/i915_drv.c:547:36: error: 'ACPI_STATE_S3' 
> > > undeclared (first use in this function)
> > > ../drivers/gpu/drm/i915/i915_drv.c:547:36: note: each undeclared 
> > > identifier is reported only once for each function it appears in
> > >   CC  net/dccp/qpolicy.o
> > > cc1: some warnings being treated as errors
> > > make[5]: *** [drivers/gpu/drm/i915/i915_drv.o] Error 1
> > 
> > Thanks for the report, we'll fix it.
> > 
> > Can anyone explain why include/linux/acpi_bus.h has #ifdef
> > CONFIG_ACPI_SLEEP and conditional build for a dummy inline version of
> > acpi_target_system_state(), *but* that does not get included or used if
> > CONFIG_ACPI=n? Additionally, the combination of CONFIG_ACPI=y and
> > CONFIG_ACPI_SLEEP=n does not seem to work at all.
> 
> These two things look like bugs to me.  Most likely not tested thoruoughly
> enough.
> 
> > So we'll really have to sprinkle #ifdef CONFIG_ACPI all over, instead of
> > neatly using the dummy versions that someone has gone through the
> > trouble of adding?
> 
> No, we don't have to.

Back from my vacation and I didn't see a conclusion to this issue here.
Rafael, have you fixed this in your acpi tree or do I need to do something
in drm-intel?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


[Intel-gfx] [RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Daniel Vetter
On Wed, Jun 25, 2014 at 10:28:21AM +0800, Chen, Tiejun wrote:
> On 2014/6/24 10:59, Zhenyu Wang wrote:
> >On 2014.06.19 17:53:51 +0800, Tiejun Chen wrote:
> >>Originally the reason to probe ISA bridge instead of Dev31:Fun0
> >>is to make graphics device passthrough work easy for VMM, that
> >>only need to expose ISA bridge to let driver know the real
> >>hardware underneath. This is a requirement from virtualization
> >>team. Especially in that virtualized environments, XEN, there
> >>is irrelevant ISA bridge in the system with that legacy qemu
> >>version specific to xen, qemu-xen-traditional. So to work
> >>reliably, we should scan through all the ISA bridge devices
> >>and check for the first match, instead of only checking the
> >>first one.
> >>
> >>But actually, qemu-xen-traditional, is always enumerated with
> >>Dev31:Fun0, 00:1f.0 as follows:
> >>
> >>hw/pt-graphics.c:
> >>
> >>intel_pch_init()
> >> |
> >> + pci_isa_bridge_init(bus, PCI_DEVFN(0x1f, 0), ...);
> >>
> >>so this mean that isa bridge is still represented with Dev31:Func0
> >>like the native OS. Furthermore, currently we're pushing VGA
> >>passthrough support into qemu upstream, and with some discussion,
> >>we wouldn't set the bridge class type and just expose this devfn.
> >>
> >>So we just go back to check devfn to make life normal.
> >>
> >>Signed-off-by: Tiejun Chen 
> >
> >This was added historically when supporting graphics device passthrough.
> >Looks qemu upstream can't accept multiple ISA bridge and our PCH is always
> >on device 31: func0 as far as I know. Looks good to me.
> >
> >Reviewed-by: Zhenyu Wang 
> >
> 
> Thanks for your review.
> 
> Do you know when this can be applied?

I'll hold off merging until we have buy-in from upstream quemu on a given
approach (which should work for both linux and windows).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


[PATCH v3 11/11] ARM: at91/dt: enable the LCD panel on sama5d3xek boards

2014-07-07 Thread Boris BREZILLON
Enable LCD related nodes and reference panel node in the hlcdc (HLCD
Controller) node.

Signed-off-by: Boris BREZILLON 
---
 arch/arm/boot/dts/sama5d31ek.dts | 24 
 arch/arm/boot/dts/sama5d33ek.dts | 24 
 arch/arm/boot/dts/sama5d34ek.dts | 24 
 arch/arm/boot/dts/sama5d36ek.dts | 24 
 4 files changed, 96 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d31ek.dts b/arch/arm/boot/dts/sama5d31ek.dts
index 04eec0d..338f4c3 100644
--- a/arch/arm/boot/dts/sama5d31ek.dts
+++ b/arch/arm/boot/dts/sama5d31ek.dts
@@ -33,6 +33,14 @@
status = "okay";
};

+   hlcdc: hlcdc at f003 {
+   status = "okay";
+
+   hlcdc-display-controller {
+   atmel,panel = < 3 0>;
+   };
+   };
+
macb1: ethernet at f802c000 {
status = "okay";
};
@@ -46,6 +54,22 @@
};
};

+   bl_reg: backlight_regulator {
+   status = "okay";
+   };
+
+   panel_reg: panel_regulator {
+   status = "okay";
+   };
+
+   backlight: backlight {
+   status = "okay";
+   };
+
+   panel: panel {
+   status = "okay";
+   };
+
sound {
status = "okay";
};
diff --git a/arch/arm/boot/dts/sama5d33ek.dts b/arch/arm/boot/dts/sama5d33ek.dts
index cbd6a3f..f2ab41d 100644
--- a/arch/arm/boot/dts/sama5d33ek.dts
+++ b/arch/arm/boot/dts/sama5d33ek.dts
@@ -36,9 +36,33 @@
macb0: ethernet at f0028000 {
status = "okay";
};
+
+   hlcdc: hlcdc at f003 {
+   status = "okay";
+
+   hlcdc-display-controller {
+   atmel,panel = < 3 0>;
+   };
+   };
};
};

+   bl_reg: backlight_regulator {
+   status = "okay";
+   };
+
+   panel_reg: panel_regulator {
+   status = "okay";
+   };
+
+   backlight: backlight {
+   status = "okay";
+   };
+
+   panel: panel {
+   status = "okay";
+   };
+
sound {
status = "okay";
};
diff --git a/arch/arm/boot/dts/sama5d34ek.dts b/arch/arm/boot/dts/sama5d34ek.dts
index 878aa16..0d0049c 100644
--- a/arch/arm/boot/dts/sama5d34ek.dts
+++ b/arch/arm/boot/dts/sama5d34ek.dts
@@ -46,6 +46,14 @@
macb0: ethernet at f0028000 {
status = "okay";
};
+
+   hlcdc: hlcdc at f003 {
+   status = "okay";
+
+   hlcdc-display-controller {
+   atmel,panel = < 3 0>;
+   };
+   };
};
};

@@ -56,6 +64,22 @@
};
};

+   bl_reg: backlight_regulator {
+   status = "okay";
+   };
+
+   panel_reg: panel_regulator {
+   status = "okay";
+   };
+
+   backlight: backlight {
+   status = "okay";
+   };
+
+   panel: panel {
+   status = "okay";
+   };
+
sound {
status = "okay";
};
diff --git a/arch/arm/boot/dts/sama5d36ek.dts b/arch/arm/boot/dts/sama5d36ek.dts
index 59576c6..8350358 100644
--- a/arch/arm/boot/dts/sama5d36ek.dts
+++ b/arch/arm/boot/dts/sama5d36ek.dts
@@ -41,12 +41,36 @@
status = "okay";
};

+   hlcdc: hlcdc at f003 {
+   status = "okay";
+
+   hlcdc-display-controller {
+   atmel,panel = < 3 0>;
+   };
+   };
+
macb1: ethernet at f802c000 {
status = "okay";
};
};
};

+   bl_reg: backlight_regulator {
+   status = "okay";
+   };
+
+   panel_reg: panel_regulator {
+   status = "okay";
+   };
+
+   backlight: backlight {
+   status = "okay";
+   };
+
+   panel: panel {
+   status = "okay";
+   };
+
sound {
status = "okay";
};
-- 
1.8.3.2



[PATCH v3 10/11] ARM: at91/dt: add LCD panel description to sama5d3xdm.dtsi

2014-07-07 Thread Boris BREZILLON
Add LCD panel related nodes (backlight, regulators and panel) to sama5d3
Display Module dtsi.

Reference LCD pin muxing used by sama5d3xek boards.

Signed-off-by: Boris BREZILLON 
---
 arch/arm/boot/dts/sama5d3xdm.dtsi | 43 +++
 1 file changed, 43 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d3xdm.dtsi 
b/arch/arm/boot/dts/sama5d3xdm.dtsi
index 035ab72..690055e 100644
--- a/arch/arm/boot/dts/sama5d3xdm.dtsi
+++ b/arch/arm/boot/dts/sama5d3xdm.dtsi
@@ -36,6 +36,49 @@
};
};
};
+
+   hlcdc: hlcdc at f003 {
+   hlcdc-display-controller {
+   pinctrl-names = "default", "rgb-444", 
"rgb-565", "rgb-666", "rgb-888";
+   pinctrl-0 = <_lcd_base>;
+   pinctrl-1 = <_lcd_base 
_lcd_rgb444>;
+   pinctrl-2 = <_lcd_base 
_lcd_rgb565>;
+   pinctrl-3 = <_lcd_base 
_lcd_rgb666_alt>;
+   pinctrl-4 = <_lcd_base 
_lcd_rgb888_alt>;
+   };
+   };
};
};
+
+   bl_reg: backlight_regulator {
+   compatible = "regulator-fixed";
+   regulator-name = "backlight-power-supply";
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <500>;
+   status = "disabled";
+   };
+
+   panel_reg: panel_regulator {
+   compatible = "regulator-fixed";
+   regulator-name = "panel-power-supply";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   status = "disabled";
+   };
+
+   backlight: backlight {
+   compatible = "pwm-backlight";
+   pwms = <_pwm 0 5 0>;
+   brightness-levels = <0 4 8 16 32 64 128 255>;
+   default-brightness-level = <6>;
+   power-supply = <_reg>;
+   status = "disabled";
+   };
+
+   panel: panel {
+   compatible = "foxlink,fl500wvr00-a0t", "simple-panel";
+   backlight = <>;
+   power-supply = <_reg>;
+   status = "disabled";
+   };
 };
-- 
1.8.3.2



[PATCH v3 09/11] ARM: at91/dt: define the HLCDC node available on sama5d3 SoCs

2014-07-07 Thread Boris BREZILLON
Define the HLCDC (HLCD Controller) IP available on some sama5d3 SoCs
(i.e. sama5d31, sama5d33, sama5d34 and sama5d36) in sama5d3 dtsi file.

Signed-off-by: Boris BREZILLON 
---
 arch/arm/boot/dts/sama5d3_lcd.dtsi | 20 
 1 file changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi 
b/arch/arm/boot/dts/sama5d3_lcd.dtsi
index 9642eef..f6aa637 100644
--- a/arch/arm/boot/dts/sama5d3_lcd.dtsi
+++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi
@@ -166,6 +166,26 @@
};
};

+   hlcdc: hlcdc at f003 {
+   compatible = "atmel,sama5d3-hlcdc";
+   reg = <0xf003 0x2000>;
+   clocks = <_clk>, <>, <>;
+   clock-names = "periph_clk","sys_clk", 
"slow_clk";
+   status = "disabled";
+
+   hlcdc-display-controller {
+   compatible = "atmel,hlcdc-dc";
+   interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
+   };
+
+   hlcdc_pwm: hlcdc-pwm {
+   compatible = "atmel,hlcdc-pwm";
+   pinctrl-names = "default";
+   pinctrl-0 = <_lcd_pwm>;
+   #pwm-cells = <3>;
+   };
+   };
+
pmc: pmc at fc00 {
periphck {
lcdc_clk: lcdc_clk {
-- 
1.8.3.2



[PATCH v3 08/11] ARM: AT91/dt: add alternative pin muxing for sama5d3 lcd pins

2014-07-07 Thread Boris BREZILLON
Define alternative pin muxing for the LCDC pins.

Signed-off-by: Boris BREZILLON 
---
 arch/arm/boot/dts/sama5d3_lcd.dtsi | 50 ++
 1 file changed, 50 insertions(+)

diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi 
b/arch/arm/boot/dts/sama5d3_lcd.dtsi
index 2186b89..9642eef 100644
--- a/arch/arm/boot/dts/sama5d3_lcd.dtsi
+++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi
@@ -82,6 +82,28 @@
 AT91_PIOA 13 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
 AT91_PIOA 14 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
 AT91_PIOA 15 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+AT91_PIOC 16 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD16 pin */
+AT91_PIOC 17 
AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD17 pin */
+   };
+
+   pinctrl_lcd_rgb666_alt: lcd-rgb-2-alt {
+   atmel,pins =
+   ; /* LCDD17 pin */
};
@@ -104,6 +126,34 @@
 AT91_PIOA 13 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD13 pin */
 AT91_PIOA 14 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD14 pin */
 AT91_PIOA 15 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD15 pin */
+AT91_PIOC 16 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD16 pin */
+AT91_PIOC 17 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD17 pin */
+AT91_PIOC 18 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD18 pin */
+AT91_PIOC 19 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD19 pin */
+AT91_PIOC 20 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD20 pin */
+AT91_PIOC 21 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD21 pin */
+AT91_PIOE 22 
AT91_PERIPH_A AT91_PINCTRL_NONE   /* LCDD22 pin */
+AT91_PIOE 23 
AT91_PERIPH_A AT91_PINCTRL_NONE>; /* LCDD23 pin */
+   };
+
+   pinctrl_lcd_rgb888_alt: lcd-rgb-3-alt {
+   atmel,pins =
+   

[PATCH v3 07/11] ARM: AT91/dt: split sama5d3 lcd pin definitions to match RGB mode configs

2014-07-07 Thread Boris BREZILLON
The HLCDC (HLCD Controller) IP supports 4 different output mode (RGB444,
RGB565, RGB666 and RGB888) and the pin muxing will depend on the chosen
RGB mode.

Split pin definitions to be able to set pin config according to the
selected mode.

Signed-off-by: Boris BREZILLON 
---
 arch/arm/boot/dts/sama5d3_lcd.dtsi | 127 -
 1 file changed, 96 insertions(+), 31 deletions(-)

diff --git a/arch/arm/boot/dts/sama5d3_lcd.dtsi 
b/arch/arm/boot/dts/sama5d3_lcd.dtsi
index 85d3027..2186b89 100644
--- a/arch/arm/boot/dts/sama5d3_lcd.dtsi
+++ b/arch/arm/boot/dts/sama5d3_lcd.dtsi
@@ -15,38 +15,103 @@
apb {
pinctrl at f200 {
lcd {
-   pinctrl_lcd: lcd-0 {
+   pinctrl_lcd_pwm: lcd-pwm-0 {
+   atmel,pins = ;/* LCDPWM */
+   };
+
+   pinctrl_lcd_base: lcd-base-0 {
+   atmel,pins =
+   ; /* LCDPCK */
+   };
+
+   pinctrl_lcd_rgb444: lcd-rgb-0 {
+   atmel,pins =
+   ; /* LCDD11 pin */
+   };
+
+   pinctrl_lcd_rgb565: lcd-rgb-1 {
+   atmel,pins =
+   ; /* LCDD15 pin */
+   };
+
+   pinctrl_lcd_rgb666: lcd-rgb-2 {
+   atmel,pins =
+   ; /* LCDD17 pin */
+   };
+
+   pinctrl_lcd_rgb888: lcd-rgb-3 {
atmel,pins =
-   ; /* PE28 periph C LCDD23 pin */
+   ; /* LCDD23 pin */
};
};
};
-- 
1.8.3.2



[PATCH v3 06/11] drm: add DT bindings documentation for atmel-hlcdc-dc driver

2014-07-07 Thread Boris BREZILLON
The Atmel HLCDC (HLCD Controller) IP available on some Atmel SoCs (i.e.
at91sam9n12, at91sam9x5 family or sama5d3 family) provides a display
controller device.

The HLCDC block provides a single RGB output port, and only supports LCD
panels connection to LCD panels for now.

The atmel,panel property link the HLCDC RGB output with the LCD panel
connected on this port (note that the HLCDC RGB connector implementation
makes use of the DRM panel framework).

Connection to other external devices (DRM bridges) might be added later by
mean of a new atmel,xxx (atmel,bridge) property.

Signed-off-by: Boris BREZILLON 
---
 .../devicetree/bindings/drm/atmel-hlcdc-dc.txt | 59 ++
 1 file changed, 59 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt

diff --git a/Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt 
b/Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt
new file mode 100644
index 000..594bdb2
--- /dev/null
+++ b/Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt
@@ -0,0 +1,59 @@
+Device-Tree bindings for Atmel's HLCDC (High LCD Controller) DRM driver
+
+The Atmel HLCDC Display Controller is subdevice of the HLCDC MFD device.
+See Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt for more details.
+
+Required properties:
+ - compatible: value should be one of the following:
+   "atmel,hlcdc-dc"
+ - interrupts: the HLCDC interrupt definition
+ - pinctrl-names: the pin control state names. Should contain "default",
+   "rgb-444", "rgb-565", "rgb-666" and "rgb-888".
+ - pinctrl-[0-4]: should contain the pinctrl states described by pinctrl
+   names.
+ - atmel,panel: Should contain a phandle with 2 parameters.
+   The first cell is a phandle to a DRM panel device
+   The second cell encodes the RGB mode, which can take the following values:
+   * 0: RGB444
+   * 1: RGB565
+   * 2: RGB666
+   * 3: RGB888
+   The third cell encodes specific flags describing LCD signals configuration
+   (see Atmel's datasheet for a full description of these fields):
+   * bit 0: HSPOL: Horizontal Synchronization Pulse Polarity
+   * bit 1: VSPOL: Vertical Synchronization Pulse Polarity
+   * bit 2: VSPDLYS: Vertical Synchronization Pulse Start
+   * bit 3: VSPDLYE: Vertical Synchronization Pulse End
+   * bit 4: DISPPOL: Display Signal Polarity
+   * bit 7: DISPDLY: LCD Controller Display Power Signal Synchronization
+   * bit 12: VSPSU: LCD Controller Vertical synchronization Pulse Setup 
Configuration
+   * bit 13: VSPHO: LCD Controller Vertical synchronization Pulse Hold 
Configuration
+   * bit 16-20: GUARDTIME: LCD DISPLAY Guard Time
+
+Example:
+
+   hlcdc: hlcdc at f003 {
+   compatible = "atmel,sama5d3-hlcdc";
+   reg = <0xf003 0x2000>;
+   clocks = <_clk>, <>, <>;
+   clock-names = "periph_clk","sys_clk", "slow_clk";
+   status = "disabled";
+
+   hlcdc-display-controller {
+   compatible = "atmel,hlcdc-dc";
+   interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
+   pinctrl-names = "default", "rgb-444", "rgb-565", 
"rgb-666", "rgb-888";
+   pinctrl-0 = <_lcd_base>;
+   pinctrl-1 = <_lcd_base _lcd_rgb444>;
+   pinctrl-2 = <_lcd_base _lcd_rgb565>;
+   pinctrl-3 = <_lcd_base _lcd_rgb666>;
+   pinctrl-4 = <_lcd_base _lcd_rgb888>;
+   };
+
+   hlcdc_pwm: hlcdc-pwm {
+   compatible = "atmel,hlcdc-pwm";
+   pinctrl-names = "default";
+   pinctrl-0 = <_lcd_pwm>;
+   #pwm-cells = <3>;
+   };
+   };
-- 
1.8.3.2



[PATCH v3 05/11] drm: add Atmel HLCDC Display Controller support

2014-07-07 Thread Boris BREZILLON
The Atmel HLCDC (HLCD Controller) IP available on some Atmel SoCs (i.e.
at91sam9n12, at91sam9x5 family or sama5d3 family) provides a display
controller device.

This display controller supports at least one primary plane and might
provide several overlays and an hardware cursor depending on the IP
version.

At the moment, this driver only implements an RGB connector to interface
with LCD panels, but support for other kind of external devices (like DRM
bridges) might be added later.

Signed-off-by: Boris BREZILLON 
---
 drivers/gpu/drm/Kconfig |   2 +
 drivers/gpu/drm/Makefile|   1 +
 drivers/gpu/drm/atmel-hlcdc/Kconfig |  11 +
 drivers/gpu/drm/atmel-hlcdc/Makefile|   7 +
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c  | 469 +++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c| 474 +++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h| 210 +++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c | 706 +++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h | 422 ++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_panel.c | 351 
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 729 
 11 files changed, 3382 insertions(+)
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/Kconfig
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/Makefile
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_panel.c
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index d1cc2f6..df6f0c1 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -182,6 +182,8 @@ source "drivers/gpu/drm/cirrus/Kconfig"

 source "drivers/gpu/drm/armada/Kconfig"

+source "drivers/gpu/drm/atmel-hlcdc/Kconfig"
+
 source "drivers/gpu/drm/rcar-du/Kconfig"

 source "drivers/gpu/drm/shmobile/Kconfig"
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 48e38ba..28c8a61 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -54,6 +54,7 @@ obj-$(CONFIG_DRM_GMA500) += gma500/
 obj-$(CONFIG_DRM_UDL) += udl/
 obj-$(CONFIG_DRM_AST) += ast/
 obj-$(CONFIG_DRM_ARMADA) += armada/
+obj-$(CONFIG_DRM_ATMEL_HLCDC)  += atmel-hlcdc/
 obj-$(CONFIG_DRM_RCAR_DU) += rcar-du/
 obj-$(CONFIG_DRM_SHMOBILE) +=shmobile/
 obj-$(CONFIG_DRM_OMAP) += omapdrm/
diff --git a/drivers/gpu/drm/atmel-hlcdc/Kconfig 
b/drivers/gpu/drm/atmel-hlcdc/Kconfig
new file mode 100644
index 000..bc07315
--- /dev/null
+++ b/drivers/gpu/drm/atmel-hlcdc/Kconfig
@@ -0,0 +1,11 @@
+config DRM_ATMEL_HLCDC
+   tristate "DRM Support for ATMEL HLCDC Display Controller"
+   depends on DRM && OF && MFD_ATMEL_HLCDC && COMMON_CLK
+   select DRM_GEM_CMA_HELPER
+   select DRM_KMS_HELPER
+   select DRM_KMS_FB_HELPER
+   select DRM_KMS_CMA_HELPER
+   select DRM_PANEL
+   help
+ Choose this option if you have an ATMEL SoC with an HLCDC display
+ controller (i.e. at91sam9n12, at91sam9x5 family or sama5d3 family).
diff --git a/drivers/gpu/drm/atmel-hlcdc/Makefile 
b/drivers/gpu/drm/atmel-hlcdc/Makefile
new file mode 100644
index 000..bf9fe0b
--- /dev/null
+++ b/drivers/gpu/drm/atmel-hlcdc/Makefile
@@ -0,0 +1,7 @@
+atmel-hlcdc-dc-y := atmel_hlcdc_crtc.o \
+   atmel_hlcdc_dc.o \
+   atmel_hlcdc_layer.o \
+   atmel_hlcdc_panel.o \
+   atmel_hlcdc_plane.o
+
+obj-$(CONFIG_DRM_ATMEL_HLCDC)  += atmel-hlcdc-dc.o
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c 
b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
new file mode 100644
index 000..8b11af8
--- /dev/null
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
@@ -0,0 +1,469 @@
+/*
+ * Copyright (C) 2014 Traphandler
+ * Copyright (C) 2014 Free Electrons
+ *
+ * Author: Jean-Jacques Hiblot 
+ * Author: Boris BREZILLON 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see .
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#include 
+
+#include "atmel_hlcdc_dc.h"
+
+/**
+ * Structure storing HW 

[PATCH v3 04/11] pwm: add DT bindings documentation for atmel-hlcdc-pwm driver

2014-07-07 Thread Boris BREZILLON
The HLCDC IP available in some Atmel SoCs (i.e. sam9x5i.e. at91sam9n12,
at91sam9x5 family or sama5d3 family) provide a PWM device.

The DT bindings used for this PWM device is following the default 3 cells
bindings described in Documentation/devicetree/bindings/pwm/pwm.txt.

Signed-off-by: Boris BREZILLON 
---
 .../devicetree/bindings/pwm/atmel-hlcdc-pwm.txt| 46 ++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt

diff --git a/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt 
b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
new file mode 100644
index 000..d5fff47
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
@@ -0,0 +1,46 @@
+Device-Tree bindings for Atmel's HLCDC (High LCD Controller) PWM driver
+
+The Atmel HLCDC PWM is subdevice of the HLCDC MFD device.
+See Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt for more details.
+
+Required properties:
+ - compatible: value should be one of the following:
+   "atmel,hlcdc-pwm"
+ - pinctr-names: the pin control state names. Should contain "default".
+ - pinctrl-0: should contain the pinctrl states described by pinctrl
+   default.
+ - #pwm-cells: should be set to 3. This PWM chip use the default 3 cells
+   bindings defined in Documentation/devicetree/bindings/pwm/pwm.txt.
+   The first cell encodes the PWM id (0 is the only acceptable value here,
+   because the chip only provide one PWM).
+   The second cell encodes the PWM period in nanoseconds.
+   The third cell encodes the PWM flags (the only supported flag is
+   PWM_POLARITY_INVERTED)
+
+Example:
+
+   hlcdc: hlcdc at f003 {
+   compatible = "atmel,sama5d3-hlcdc";
+   reg = <0xf003 0x2000>;
+   clocks = <_clk>, <>, <>;
+   clock-names = "periph_clk","sys_clk", "slow_clk";
+   status = "disabled";
+
+   hlcdc-display-controller {
+   compatible = "atmel,hlcdc-dc";
+   interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
+   pinctrl-names = "default", "rgb-444", "rgb-565", 
"rgb-666", "rgb-888";
+   pinctrl-0 = <_lcd_base>;
+   pinctrl-1 = <_lcd_base _lcd_rgb444>;
+   pinctrl-2 = <_lcd_base _lcd_rgb565>;
+   pinctrl-3 = <_lcd_base _lcd_rgb666>;
+   pinctrl-4 = <_lcd_base _lcd_rgb888>;
+   };
+
+   hlcdc_pwm: hlcdc-pwm {
+   compatible = "atmel,hlcdc-pwm";
+   pinctrl-names = "default";
+   pinctrl-0 = <_lcd_pwm>;
+   #pwm-cells = <3>;
+   };
+   };
-- 
1.8.3.2



[PATCH v3 03/11] pwm: add support for atmel-hlcdc-pwm device

2014-07-07 Thread Boris BREZILLON
The HLCDC IP available in some Atmel SoCs (i.e. sam9x5i.e. at91sam9n12,
at91sam9x5 family or sama5d3 family) provide a PWM device.

This driver add support for a PWM chip exposing a single PWM device (which
will most likely be used to drive a backlight device).

Signed-off-by: Boris BREZILLON 
---
 drivers/pwm/Kconfig   |   9 ++
 drivers/pwm/Makefile  |   1 +
 drivers/pwm/pwm-atmel-hlcdc.c | 229 ++
 3 files changed, 239 insertions(+)
 create mode 100644 drivers/pwm/pwm-atmel-hlcdc.c

diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 5b34ff2..7186242 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -50,6 +50,15 @@ config PWM_ATMEL
  To compile this driver as a module, choose M here: the module
  will be called pwm-atmel.

+config PWM_ATMEL_HLCDC_PWM
+   tristate "Atmel HLCDC PWM support"
+   depends on MFD_ATMEL_HLCDC
+   help
+ Generic PWM framework driver for Atmel HLCDC PWM.
+
+ To compile this driver as a module, choose M here: the module
+ will be called pwm-atmel.
+
 config PWM_ATMEL_TCB
tristate "Atmel TC Block PWM support"
depends on ATMEL_TCLIB && OF
diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile
index e57d2c3..a245519 100644
--- a/drivers/pwm/Makefile
+++ b/drivers/pwm/Makefile
@@ -2,6 +2,7 @@ obj-$(CONFIG_PWM)   += core.o
 obj-$(CONFIG_PWM_SYSFS)+= sysfs.o
 obj-$(CONFIG_PWM_AB8500)   += pwm-ab8500.o
 obj-$(CONFIG_PWM_ATMEL)+= pwm-atmel.o
+obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM)  += pwm-atmel-hlcdc.o
 obj-$(CONFIG_PWM_ATMEL_TCB)+= pwm-atmel-tcb.o
 obj-$(CONFIG_PWM_BFIN) += pwm-bfin.o
 obj-$(CONFIG_PWM_CLPS711X) += pwm-clps711x.o
diff --git a/drivers/pwm/pwm-atmel-hlcdc.c b/drivers/pwm/pwm-atmel-hlcdc.c
new file mode 100644
index 000..7f25197
--- /dev/null
+++ b/drivers/pwm/pwm-atmel-hlcdc.c
@@ -0,0 +1,229 @@
+/*
+ * Copyright (C) 2014 Free Electrons
+ * Copyright (C) 2014 Atmel
+ *
+ * Author: Boris BREZILLON 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see .
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define ATMEL_HLCDC_PWMCVAL_MASK   GENMASK(15, 8)
+#define ATMEL_HLCDC_PWMCVAL(x) ((x << 8) & ATMEL_HLCDC_PWMCVAL_MASK)
+#define ATMEL_HLCDC_PWMPOL BIT(4)
+#define ATMEL_HLCDC_PWMPS_MASK GENMASK(2, 0)
+#define ATMEL_HLCDC_PWMPS_MAX  0x6
+#define ATMEL_HLCDC_PWMPS(x)   ((x) & ATMEL_HLCDC_PWMPS_MASK)
+
+struct atmel_hlcdc_pwm_chip {
+   struct pwm_chip chip;
+   struct atmel_hlcdc *hlcdc;
+   struct clk *cur_clk;
+};
+
+static inline struct atmel_hlcdc_pwm_chip *
+pwm_chip_to_atmel_hlcdc_pwm_chip(struct pwm_chip *chip)
+{
+   return container_of(chip, struct atmel_hlcdc_pwm_chip, chip);
+}
+
+static int atmel_hlcdc_pwm_config(struct pwm_chip *c,
+ struct pwm_device *pwm,
+ int duty_ns, int period_ns)
+{
+   struct atmel_hlcdc_pwm_chip *chip =
+   pwm_chip_to_atmel_hlcdc_pwm_chip(c);
+   struct atmel_hlcdc *hlcdc = chip->hlcdc;
+   struct clk *new_clk = hlcdc->slow_clk;
+   u64 pwmcval = duty_ns * 256;
+   unsigned long clk_freq;
+   u64 clk_period_ns;
+   u32 pwmcfg;
+   int pres;
+
+   clk_freq = clk_get_rate(new_clk);
+   clk_period_ns = 10;
+   clk_period_ns *= 256;
+   do_div(clk_period_ns, clk_freq);
+
+   if (clk_period_ns > period_ns) {
+   new_clk = hlcdc->sys_clk;
+   clk_freq = clk_get_rate(new_clk);
+   clk_period_ns = 10;
+   clk_period_ns *= 256;
+   do_div(clk_period_ns, clk_freq);
+   }
+
+   for (pres = ATMEL_HLCDC_PWMPS_MAX; pres >= 0; pres--) {
+   if ((clk_period_ns << pres) <= period_ns)
+   break;
+   }
+
+   if (pres > ATMEL_HLCDC_PWMPS_MAX)
+   return -EINVAL;
+
+   pwmcfg = ATMEL_HLCDC_PWMPS(pres);
+
+   if (new_clk != chip->cur_clk) {
+   u32 gencfg = 0;
+
+   clk_prepare_enable(new_clk);
+   clk_disable_unprepare(chip->cur_clk);
+   chip->cur_clk = new_clk;
+
+   if (new_clk != hlcdc->slow_clk)
+   gencfg = ATMEL_HLCDC_CLKPWMSEL;
+   

[PATCH v3 02/11] mfd: add documentation for atmel-hlcdc DT bindings

2014-07-07 Thread Boris BREZILLON
The HLCDC IP available on some Atmel SoCs (i.e. at91sam9n12, at91sam9x5
family or sama5d3 family) exposes 2 subdevices:
- a display controller (controlled by a DRM driver)
- a PWM chip

This patch adds documentation for atmel-hlcdc DT bindings.

Signed-off-by: Boris BREZILLON 
---
 .../devicetree/bindings/mfd/atmel-hlcdc.txt| 40 ++
 1 file changed, 40 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt

diff --git a/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt 
b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt
new file mode 100644
index 000..294048a
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt
@@ -0,0 +1,40 @@
+Device-Tree bindings for Atmel's HLCDC (High LCD Controller) MFD driver
+
+Required properties:
+ - compatible: value should be one of the following:
+   "atmel,sama5d3-hlcdc"
+ - reg: base address and size of the HLCDC device registers.
+ - clock-names: the name of the 3 clocks requested by the HLCDC device.
+   Should contain "periph_clk", "sys_clk" and "slow_clk".
+ - clocks: should contain the 3 clocks requested by the HLCDC device.
+
+The HLCDC IP exposes two subdevices:
+ - a PWM chip: see Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
+ - a Display Controller: see 
Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt
+
+Example:
+
+   hlcdc: hlcdc at f003 {
+   compatible = "atmel,sama5d3-hlcdc";
+   reg = <0xf003 0x2000>;
+   clocks = <_clk>, <>, <>;
+   clock-names = "periph_clk","sys_clk", "slow_clk";
+
+   hlcdc-display-controller {
+   compatible = "atmel,hlcdc-dc";
+   interrupts = <36 IRQ_TYPE_LEVEL_HIGH 0>;
+   pinctrl-names = "default", "rgb-444", "rgb-565", 
"rgb-666", "rgb-888";
+   pinctrl-0 = <_lcd_base>;
+   pinctrl-1 = <_lcd_base _lcd_rgb444>;
+   pinctrl-2 = <_lcd_base _lcd_rgb565>;
+   pinctrl-3 = <_lcd_base _lcd_rgb666>;
+   pinctrl-4 = <_lcd_base _lcd_rgb888>;
+   };
+
+   hlcdc_pwm: hlcdc-pwm {
+   compatible = "atmel,hlcdc-pwm";
+   pinctrl-names = "default";
+   pinctrl-0 = <_lcd_pwm>;
+   #pwm-cells = <3>;
+   };
+   };
-- 
1.8.3.2



[PATCH v3 01/11] mfd: add atmel-hlcdc driver

2014-07-07 Thread Boris BREZILLON
The HLCDC IP available on some Atmel SoCs (i.e. at91sam9n12, at91sam9x5
family or sama5d3 family) exposes 2 subdevices:
- a display controller (controlled by a DRM driver)
- a PWM chip

The MFD device provides a regmap and several clocks (those connected
to this hardware block) to its subdevices.

This way concurrent accesses to the iomem range are handled by the regmap
framework, and each subdevice can safely access HLCDC registers.

Signed-off-by: Boris BREZILLON 
---
 drivers/mfd/Kconfig |  12 
 drivers/mfd/Makefile|   1 +
 drivers/mfd/atmel-hlcdc.c   | 119 
 include/linux/mfd/atmel-hlcdc.h |  78 ++
 4 files changed, 210 insertions(+)
 create mode 100644 drivers/mfd/atmel-hlcdc.c
 create mode 100644 include/linux/mfd/atmel-hlcdc.h

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index ee8204c..75e674f 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -59,6 +59,18 @@ config MFD_AAT2870_CORE
  additional drivers must be enabled in order to use the
  functionality of the device.

+config MFD_ATMEL_HLCDC
+   tristate "Atmel HLCDC (HLCD Controller)"
+   select MFD_CORE
+   select REGMAP_MMIO
+   depends on OF
+   help
+ Choose this option if you have an ATMEL SoC with an HLCDC (HLCD
+ Controller) IP (i.e. at91sam9n12, at91sam9x5 family or sama5d3
+ family).
+ This MFD device exposes two subdevices: a PWM chip and a Display
+ Controller.
+
 config MFD_BCM590XX
tristate "Broadcom BCM590xx PMUs"
select MFD_CORE
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 8afedba..5f25b0d 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -156,6 +156,7 @@ obj-$(CONFIG_MFD_PM8921_CORE)   += pm8921-core.o ssbi.o
 obj-$(CONFIG_TPS65911_COMPARATOR)  += tps65911-comparator.o
 obj-$(CONFIG_MFD_TPS65090) += tps65090.o
 obj-$(CONFIG_MFD_AAT2870_CORE) += aat2870-core.o
+obj-$(CONFIG_MFD_ATMEL_HLCDC)  += atmel-hlcdc.o
 obj-$(CONFIG_MFD_INTEL_MSIC)   += intel_msic.o
 obj-$(CONFIG_MFD_PALMAS)   += palmas.o
 obj-$(CONFIG_MFD_VIPERBOARD)+= viperboard.o
diff --git a/drivers/mfd/atmel-hlcdc.c b/drivers/mfd/atmel-hlcdc.c
new file mode 100644
index 000..381dd06
--- /dev/null
+++ b/drivers/mfd/atmel-hlcdc.c
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2014 Free Electrons
+ * Copyright (C) 2014 Atmel
+ *
+ * Author: Boris BREZILLON 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see .
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define ATMEL_HLCDC_REG_MAX(0x4000 - 0x4)
+
+static const struct mfd_cell atmel_hlcdc_cells[] = {
+   {
+   .name = "atmel-hlcdc-pwm",
+   .of_compatible = "atmel,hlcdc-pwm",
+   },
+   {
+   .name = "atmel-hlcdc-dc",
+   .of_compatible = "atmel,hlcdc-dc",
+   },
+};
+
+static const struct regmap_config atmel_hlcdc_regmap_config = {
+   .reg_bits = 32,
+   .val_bits = 32,
+   .reg_stride = 4,
+   .max_register = ATMEL_HLCDC_REG_MAX,
+};
+
+static int atmel_hlcdc_probe(struct platform_device *pdev)
+{
+   struct device *dev = >dev;
+   struct atmel_hlcdc *hlcdc;
+   struct resource *res;
+   void __iomem *regs;
+
+   hlcdc = devm_kzalloc(dev, sizeof(*hlcdc), GFP_KERNEL);
+   if (!hlcdc)
+   return -ENOMEM;
+
+   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+   regs = devm_ioremap_resource(dev, res);
+   if (IS_ERR(regs))
+   return PTR_ERR(regs);
+
+   hlcdc->periph_clk = devm_clk_get(dev, "periph_clk");
+   if (IS_ERR(hlcdc->periph_clk)) {
+   dev_err(dev, "failed to get peripheral clock\n");
+   return PTR_ERR(hlcdc->periph_clk);
+   }
+
+   hlcdc->sys_clk = devm_clk_get(dev, "sys_clk");
+   if (IS_ERR(hlcdc->sys_clk)) {
+   dev_err(dev, "failed to get system clock\n");
+   return PTR_ERR(hlcdc->sys_clk);
+   }
+
+   hlcdc->slow_clk = devm_clk_get(dev, "slow_clk");
+   if (IS_ERR(hlcdc->slow_clk)) {
+   dev_err(dev, "failed to get slow clock\n");
+   return PTR_ERR(hlcdc->slow_clk);
+   }
+
+   hlcdc->regmap = devm_regmap_init_mmio(dev, regs,
+ _hlcdc_regmap_config);
+   if 

[PATCH v3 00/11] drm: add support for Atmel HLCDC Display Controller

2014-07-07 Thread Boris BREZILLON
Hello,

This patch series adds support for Atmel HLCDC (HLCD Controller) available
on some Atmel SoCs (i.e. the sama5d3 family).

The first two versions of this series didn't receive any reviews from DRM
maintainers or experienced DRM developers.
Anyway, I hope I'll get some feedback on this version.

The HLCDC actually provides a Display Controller and a PWM device, hence I
decided to declare an MFD device exposing 2 subdevices: a display
controller and a PWM chip.
This also solves a circular dependency issue preventing HLCDC driver from
unloading.
The HLCDC request a drm_panel device, which request a backlight device
(a PWM backlight), which depends on a PWM which is provided by the HLCDC
driver (hlcdc -> panel -> backlight -> hlcdc (pwm part)).

The current implementation only supports sama5d3 SoCs but other SoCs should
be easily ported by defining new compatible strings and adding HLCDC
description structures for these SoCs.

The drivers supports basic CRTC functionalities, several overlays and an
hardware cursor.

At the moment, it only supports connection to LCD panels through an RGB
connector (defined as an LVDS connector in my implementation), though
connection to other kind of devices (like DRM bridges) can be added later.

It also supports several RGB format on all planes and some YUV formats on
the HEO overlay plane.

Best Regards,

Boris

Changes since v1:
- fix coding style issues (macro indentation)
- make use of GENMASK in several places
- declare regmap config as a static structure
- rework hlcdc plane update API
- rework cursor handling to make use of the new plane update API
- fix backporch config
- do not use devm_regmap_init_mmio_clk to avoid extra clk_enable
  clk disable calls when accessing registers
- explicitely include regmap and clk headers instead of relying on
  atmel-hlcdc.h inclusions
- make the atmel-hlcdc driver depends on CONFIG_OF
- separate DT bindings documentation from driver implementation
- support several pin muxing for HLCDC pins on sama5d3 SoCs

Changes since v1:
- replace the backlight driver by a PWM driver
- make use of drm_panel infrastructure
- split driver code in several subsystem: MFD, PWM and DRM
- add support for overlays
- add support for hardware cursor


Boris BREZILLON (11):
  mfd: add atmel-hlcdc driver
  mfd: add documentation for atmel-hlcdc DT bindings
  pwm: add support for atmel-hlcdc-pwm device
  pwm: add DT bindings documentation for atmel-hlcdc-pwm driver
  drm: add Atmel HLCDC Display Controller support
  drm: add DT bindings documentation for atmel-hlcdc-dc driver
  ARM: AT91/dt: split sama5d3 lcd pin definitions to match RGB mode
configs
  ARM: AT91/dt: add alternative pin muxing for sama5d3 lcd pins
  ARM: at91/dt: define the HLCDC node available on sama5d3 SoCs
  ARM: at91/dt: add LCD panel description to sama5d3xdm.dtsi
  ARM: at91/dt: enable the LCD panel on sama5d3xek boards

 .../devicetree/bindings/drm/atmel-hlcdc-dc.txt |  59 ++
 .../devicetree/bindings/mfd/atmel-hlcdc.txt|  40 ++
 .../devicetree/bindings/pwm/atmel-hlcdc-pwm.txt|  46 ++
 arch/arm/boot/dts/sama5d31ek.dts   |  24 +
 arch/arm/boot/dts/sama5d33ek.dts   |  24 +
 arch/arm/boot/dts/sama5d34ek.dts   |  24 +
 arch/arm/boot/dts/sama5d36ek.dts   |  24 +
 arch/arm/boot/dts/sama5d3_lcd.dtsi | 197 +-
 arch/arm/boot/dts/sama5d3xdm.dtsi  |  43 ++
 drivers/gpu/drm/Kconfig|   2 +
 drivers/gpu/drm/Makefile   |   1 +
 drivers/gpu/drm/atmel-hlcdc/Kconfig|  11 +
 drivers/gpu/drm/atmel-hlcdc/Makefile   |   7 +
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 469 +
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c   | 474 ++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h   | 210 ++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.c| 706 
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_layer.h| 422 
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_panel.c| 351 ++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c| 729 +
 drivers/mfd/Kconfig|  12 +
 drivers/mfd/Makefile   |   1 +
 drivers/mfd/atmel-hlcdc.c  | 119 
 drivers/pwm/Kconfig|   9 +
 drivers/pwm/Makefile   |   1 +
 drivers/pwm/pwm-atmel-hlcdc.c  | 229 +++
 include/linux/mfd/atmel-hlcdc.h|  78 +++
 27 files changed, 4281 insertions(+), 31 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/drm/atmel-hlcdc-dc.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/atmel-hlcdc.txt
 create mode 100644 Documentation/devicetree/bindings/pwm/atmel-hlcdc-pwm.txt
 create mode 100644 drivers/gpu/drm/atmel-hlcdc/Kconfig
 create mode 100644 

[RFC][PATCH] gpu:drm:i915:intel_detect_pch: back to check devfn instead of check class type

2014-07-07 Thread Daniel Vetter
On Wed, Jun 25, 2014 at 08:48:32AM +0200, Paolo Bonzini wrote:
> It is only slightly better, but the right solution is to fix the driver.
> There is absolutely zero reason why a graphics driver should know about the
> vendor/device ids of the PCH.

There is a very valid reason to know about the PCH since it _is_ part of
the gpu. You don't notice this all that much in the driver since the
hardware provides magic mmio regions in the main vga device register bar
which remap to the relevant PCH register ranges. And an awful lot of other
stuff like the MCH. So from an abstract pov you could only pass the intel
igt to a guest if you'd forward the gfx device, the mch/host bridge and
the pch. Thanks to these magic mmio windows we don't need those, except
that someone forgot to forward the pch pci id.

So the correct fix to forward intel gpus to guests is indeed to somehow
fake the pch pci ids since the driver really needs them. Gross design, but
that's how the hardware works.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


[Bug 21816] glean/vertProg1 test fails on some r300 and higher cards

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=21816

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #5 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/251d445a/attachment.html>


[Bug 31465] [R420] KMS: Compositing unusably slow

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=31465

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #7 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/a9252c91/attachment-0001.html>


[Bug 22758] Glest falls back to software rendering on radeon (rs690)

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=22758

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #6 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/3c1e6fff/attachment-0001.html>


[Bug 28216] Radeon driver "No buffer for z buffer" error

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=28216

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #6 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/dd1c19b6/attachment-0001.html>


[Bug 26259] Wine bloodlines crashes on "new game" on a Radeon Mobility X700 (PCIE)

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=26259

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #7 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/8dba7b68/attachment.html>


[Bug 31567] [r300] swrast/s_span.c:1267: _swrast_write_rgba_span: Assertion `rb->PutValues' failed.

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=31567

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/a7a32f05/attachment-0001.html>


[Bug 26496] OpenGL does not work on Radeon 9600 (r300)

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=26496

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #16 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/bd253f75/attachment-0001.html>


[Bug 20608] gtkglext example program locks up system with Mobility X1400 chipset

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=20608

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #8 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/ec54115c/attachment.html>


[Bug 26541] flickering texture and chirring on OpenArena with highest texture

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=26541

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #6 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/e2ac0f24/attachment-0001.html>


[Bug 31566] [r300] swrast/s_span.c:1349: _swrast_read_rgba_span: Assertion `rb->GetRow' failed.

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=31566

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/23d5a827/attachment-0001.html>


[Bug 47289] SIGSEGV at r300_state.c:1066

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=47289

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/8bb10aba/attachment.html>


[Bug 27416] X.org crashes reproducably when mouse hovers over last opened file menu entry in KWrite

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=27416

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #10 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/e571c2a7/attachment-0001.html>


[Bug 22868] [r300 - RV530] glthreads always fails with many threads

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=22868

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/586a6c13/attachment-0001.html>


[Bug 25665] [RS690]:Running OpenGL application hangs the system

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=25665

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #5 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/f5f5e3ec/attachment-0001.html>


[Bug 28771] [RADEON:KMS::R300C:R300G] waiting for vline forced always on

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=28771

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #34 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/d634b922/attachment-0001.html>


[Bug 26515] Corrupt textures

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=26515

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #7 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/4589aeb2/attachment-0001.html>


[Bug 23781] Wine + Civ4 BTS crashes after a short time

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=23781

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #3 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/74805385/attachment-0001.html>


[Bug 24365] [7.6] glxinfo: main/context.c:640: check_context_limits: Assertion failed

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=24365

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #8 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/f6b5d7a6/attachment-0001.html>


[Bug 26514] improper ENOMEM errors with Radeon 6.12.4

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=26514

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #6 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/a544fe3c/attachment-0001.html>


[Bug 21805] radeon-rewrite: crash in glCopyTexSubImage2D

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=21805

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #11 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/7634a584/attachment.html>


[Bug 27786] Freeze if boss-key (Shift-Esc) pressed while busy doing network stuff and game engine not running

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=27786

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #7 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/c61deca7/attachment.html>


[Bug 24475] clutter applications are unusable with radeon/radeonhd

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=24475

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #6 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/92edb5fd/attachment-0001.html>


[Bug 15737] r300 classic SmoothFlag low-impact fallback

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=15737

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/bac0583e/attachment-0001.html>


[Bug 23783] Xorg crashes randomly with compositing enabled

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=23783

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #5 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/627bfcb1/attachment.html>


[Bug 25163] HoN doesn't start on Xpress200M

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=25163

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/f408eba5/attachment.html>


[Bug 23019] Suse11-64 : System hangs on killing the X server with CTRL+ALT+Backspace

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=23019

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #6 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/02b26b4e/attachment.html>


[Bug 29110] X server crash when entering address in addressbar of konqueror

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=29110

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/c2dc7c28/attachment.html>


[Bug 10561] SecondLife client hangs at startup with r300

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=10561

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #33 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/717e331a/attachment-0001.html>


[Bug 22398] Googleearth and Mplayer crashes

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=22398

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #8 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/fdc26e97/attachment.html>


[Bug 21472] EnablePageFlip hangs the system with xpress 200M in 3d games

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=21472

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #3 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/322c45a2/attachment-0001.html>


[Bug 22018] Normalized texture rectangles

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=22018

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/ed987ffa/attachment-0001.html>


[Bug 15525] No transparency in VMD

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=15525

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #4 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/bc673ffa/attachment-0001.html>


[Bug 12282] hi cpu usage with simple 3d apps

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=12282

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #7 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/d587685b/attachment-0001.html>


[Bug 25356] Segmentation fault occurs on running cd

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=25356

Andreas Boll  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |WONTFIX

--- Comment #10 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/7e2f96f4/attachment-0001.html>


[Bug 26715] random freeze in ioquake3 like games

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=26715

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #7 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/c158a1b1/attachment-0001.html>


[Bug 22532] Black background instead of transperancy in cairo-dock (openGL)

2014-07-07 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=22532

Andreas Boll  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #3 from Andreas Boll  ---
The classic r300 driver has been abandoned long ago.
It was replaced by the Gallium driver r300g.

If you have issues with r300g please file a new bug report with component
Drivers/Gallium/r300

Thanks.

-- 
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/20140707/f553c07d/attachment.html>


  1   2   >