[patch] drm/sysfs: testing the wrong variable in drm_sysfs_device_add()

2013-11-28 Thread Dan Carpenter
There is a typo here so we don't check for allocation failure properly.

Fixes: 760c960bd688 ('drm/sysfs: fix hotplug regression since lifetime changes')
Signed-off-by: Dan Carpenter 

diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index bd2bca395792..c22c3097c3e8 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -516,7 +516,7 @@ int drm_sysfs_device_add(struct drm_minor *minor)
 minor_str = "card%d";

minor->kdev = kzalloc(sizeof(*minor->kdev), GFP_KERNEL);
-   if (!minor->dev) {
+   if (!minor->kdev) {
r = -ENOMEM;
goto error;
}


[patch] drm/nv50/disp: min/max are reversed in nv50_crtc_gamma_set()

2013-11-28 Thread Dan Carpenter
We should be taking the minimum here instead of the max.  It could lead
to a buffer overflow.

Fixes: 438d99e3b175 ('drm/nvd0/disp: initial crtc object implementation')
Signed-off-by: Dan Carpenter 

diff --git a/drivers/gpu/drm/nouveau/nv50_display.c 
b/drivers/gpu/drm/nouveau/nv50_display.c
index f8e66c08b11a..4e384a2f99c3 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -1265,7 +1265,7 @@ nv50_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 
*g, u16 *b,
uint32_t start, uint32_t size)
 {
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
-   u32 end = max(start + size, (u32)256);
+   u32 end = min_t(u32, start + size, 256);
u32 i;

for (i = start; i < end; i++) {


[Bug 71285] Xonotic LLVM ERROR

2013-11-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=71285

Tom Stellard  changed:

   What|Removed |Added

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

--- Comment #18 from Tom Stellard  ---
The fix was committed to the LLVM tree: r195880

-- 
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/20131128/ca5eb8cc/attachment.html>


[Bug 68224] [radeonsi] Serious Sam3 is segfaulting (LLVM assert)

2013-11-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=68224

Tom Stellard  changed:

   What|Removed |Added

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

--- Comment #39 from Tom Stellard  ---
The fix was committed to the LLVM tree: r195880

-- 
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/20131128/203612d3/attachment.html>


[Bug 72093] New: GLAMOR:X crashes when clicking the OpenGL entry in KInfoCenter

2013-11-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=72093

  Priority: medium
Bug ID: 72093
  Assignee: dri-devel at lists.freedesktop.org
   Summary: GLAMOR:X crashes when clicking the OpenGL entry in
KInfoCenter
  Severity: normal
Classification: Unclassified
OS: Linux (All)
  Reporter: thepouar at gmail.com
  Hardware: x86-64 (AMD64)
Status: NEW
   Version: 9.2
 Component: Drivers/DRI/R600
   Product: Mesa

Created attachment 89930
  --> https://bugs.freedesktop.org/attachment.cgi?id=89930&action=edit
Xorg log file

X crashes when clicking the OpenGL entry in KInfoCenter when using GLAMOR. It
works just fine with EXA. I'm using Radeon 6970.

-- 
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/20131128/2b3520d8/attachment-0001.html>


[git pull] drm minor fixes

2013-11-28 Thread Dave Airlie

Hi Linus,

just two minor fixes as people keep resending since they are so low 
hanging.

Dave.

The following changes since commit 8ae516aa8b8161254d3e402b3348b2a9b8d1efd0:

  Merge tag 'trace-fixes-v3.13-rc1' of 
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace (2013-11-26 
18:04:21 -0800)

are available in the git repository at:


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

for you to fetch changes up to eec99016e38b740662509f097effb90abc7a1376:

  drm/nouveau/hwmon: fix compilation without CONFIG_HWMON (2013-11-28 14:38:09 
+1000)


David Herrmann (1):
  drm/sysfs: fix OOM verification

Ilia Mirkin (1):
  drm/nouveau/hwmon: fix compilation without CONFIG_HWMON

 drivers/gpu/drm/drm_sysfs.c | 2 +-
 drivers/gpu/drm/nouveau/nouveau_hwmon.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)


[Bug 65121] Possible memory leak in qxl drm driver

2013-11-28 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=65121

Dave Airlie  changed:

   What|Removed |Added

 CC||airlied at linux.ie

--- Comment #5 from Dave Airlie  ---
what are you running just console?

or is X running?

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


[Bug 65911] radeon: garbled output/only noise through HDMI and GPU lockups

2013-11-28 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=65911

--- Comment #9 from tomka  ---
Thanks for the clarification. I just tested different versions of the userspace
tools---unfortunately, without any success. For every component tested, I made
sure the others are used in their resent stable version.


libdrm-git with the current master and

c6d73cfeeaff9596c735d0a10b248f94b2e1e347
Tue Jul 2 09:24:53 2013 +0100

040f6b015ef7d9c1bda09f78a8873f6da45d5e95 (first this year)
Thu May 9 12:55:42 2013 +1000

2089a0080edb1b42449ee9a97f2cef7399c16d53
Mon Nov 5 22:21:42 2012 +


xf86-video-ati-git with current master and

67fb82a3f0759b171fea21b475a70fa825693570
Tue Oct 1 09:35:30 2013 -0400

fdb7563a5cbc736b09c2864b67a93b475c98b2bd
Thu Jan 24 21:17:11 2013 -0500

4e35b2f530e2ca8c7b7220cacd05c661de43d20d
Thu Jan 10 12:10:52 2013 +0100

60cd6ceaf44b506433aebf6b3a639a17604dfddd
Wed Nov 21 18:42:56 2012


mesa-git (and thereby mesa-libgl-git and ati-dri-gitwith current master and

e556286802811b4b99c692d1ff5197f8ee1f011b
Wed Mar 20 11:54:33 2013 -0700

5ffa28df4e4cc22481b4ed41c78632f35765f41d
Wed Jul 31 15:18:52 2013 +0200


For mesa-git, I couldn't get further back in history easily, because Bison 3
wasn't supported before. Like I said, no change couldn't fix the GPU lockups or
even change the error itself. During the tests, however, I figured there was
slightly more detail in the dmesg log which I didn't see before:

kernel: radeon :00:01.0: GPU lockup CP stall f...ec
kernel: radeon :00:01.0: GPU lockup (waiting f...2)
kernel: [drm:r600_ib_test] *ERROR* radeon: fence w...).
kernel: [drm:radeon_ib_ring_tests] *ERROR* radeon:...).
kernel: radeon :00:01.0: ib ring test failed (-35).

Do you have any suggestions on what I could try next?

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


[Bug 65121] Possible memory leak in qxl drm driver

2013-11-28 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=65121

--- Comment #6 from Dave Airlie  ---
Created attachment 116501
  --> https://bugzilla.kernel.org/attachment.cgi?id=116501&action=edit
fix

does this fix it?

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


[RFC patch] PCI: Extend boot_vga sysfs attribute lookup to fix X on MBA+EFI

2013-11-28 Thread Bruno Prémont
Hi David,

On Wed, 27 Nov 2013 21:40:39 +0100 David Herrmann wrote:
> On Mon, Nov 25, 2013 at 8:54 PM, Bruno Pr?mont wrote:
> > On a MacBookAir2,1, booting to Linux with EFI though having
> > no efifb built-in Xorg refuses to start with "no devices detected"
> > because for the only VGA device available (NVidia Geforce 9400M)
> > the sysfs attribute boot_vga is zero (instead of expected 1).
> >
> > When CONFIG_FB_EFI is selected, efifb does provide its own
> > vga_default_device() to report the PCI device matching global
> > screen_info as determined during efifb setup.
> >
> > Otherwise there is just a dummy or VGA_ARB's vga_default_device()
> > that does not provide the right information.
> >
> > On the other hand, boot_vga_show() falls back to poking PCI
> > resources to flag a PCI device as boot_vga if vga_default_device()
> > returned no PCI device (NULL).
> >
> > To complement this PCI resource poking, this patch copies the
> > validation code used to determine which PCI device to report as
> > default VGA device by efifb into boot_vga_show().
> >
> > Signed-off-by: Bruno Pr?mont 
> > ---
> > Would it make sense to kill the corresponding code from efifb
> > as it covers only a single case?
> >
> > The other EFI capable system I have (AMD Ilano based, Gigabyte
> > mainboard does report boot_vga=1, possibly through the resources
> > poking and there Xorg starts properly without efifb built in.
> >
> > Selecting CONFIG_X86_SYSFB (combined with CONFIG_FB_SIMPLE) does
> > not help by itself, patching that one instead of PCI's boot_vga
> > attribute directly would still not cover the case when neither
> > of them is enabled.
> 
> How about moving the code from efifb to arch/x86/kernel/sysfb_efi.c?
> efifb is x86 only so we don't break anything by this. And all the
> other efi-quirks have already been moved. Imho this would be the
> easiest fix right now. But if you can spend some time to clean up the
> vga_default_device() mess, please go ahead.

Well, I don't know how things work on other arches where GPU is
a PCI device...

Possibly the issue exists for any arch whose firmware does not cause
  !!(pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW)
to be 1 and for which there is no magic vga_default_device()
re-implementation.

That's the reason why I don't think moving it to any arch/firmware
place is such a good idea.


I will cook the vga_default_device() cleanup over the weekend and
post a follow-up patch by then.

> Btw., thanks for tracking this down. It bothered me for quite some
> while that Xorg ignores my cards if I boot via efi..

I already hit it a year ago or so and did hide it by keeping
efifb enabled on the MBA (had not been looking at the cause by then
though, thinking it was some magic EFI poking needed on MBA as
FB_EFI=n worked fine on a EFI PC system with radeon).

Bruno


> Thanks
> David
> 
> >
> >  drivers/pci/pci-sysfs.c | 21 +
> >  1 file changed, 21 insertions(+)
> >
> > diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> > index 7128cfd..91cac71 100644
> > --- a/drivers/pci/pci-sysfs.c
> > +++ b/drivers/pci/pci-sysfs.c
> > @@ -28,6 +28,7 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >  #include 
> >  #include "pci.h"
> >
> > @@ -540,6 +541,26 @@ boot_vga_show(struct device *dev, struct 
> > device_attribute *attr, char *buf)
> > if (vga_dev)
> > return sprintf(buf, "%u\n", (pdev == vga_dev));
> >
> > +   if ((pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA) {
> > +   resource_size_t start, end;
> > +   int i;
> > +
> > +   for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
> > +   if (!(pci_resource_flags(pdev, i) & IORESOURCE_MEM))
> > +   continue;
> > +
> > +   start = pci_resource_start(pdev, i);
> > +   end  = pci_resource_end(pdev, i);
> > +
> > +   if (!start || !end)
> > +   continue;
> > +
> > +   if (screen_info.lfb_base >= start &&
> > +   (screen_info.lfb_base + 
> > screen_info.lfb_size) < end)
> > +   return sprintf(buf, "1\n");
> > +   }
> > +   }
> > +
> > return sprintf(buf, "%u\n",
> > !!(pdev->resource[PCI_ROM_RESOURCE].flags &
> >IORESOURCE_ROM_SHADOW));
> > ___
> > dri-devel mailing list
> > dri-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 68224] [radeonsi] Serious Sam3 is segfaulting (LLVM assert)

2013-11-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=68224

--- Comment #40 from darkbasic  ---
Created attachment 89954
  --> https://bugs.freedesktop.org/attachment.cgi?id=89954&action=edit
screenshot

It works but it's unplayable, 25 fps with shit graphic settings and 5 fps with
Ultra graphic settings.

-- 
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/20131128/f8d18675/attachment.html>


[PATCH v3 13/32] drm/exynos: hdmi: remove the i2c drivers and use devtree

2013-11-28 Thread Tomasz Figa
On Monday 11 of November 2013 09:44:27 Thierry Reding wrote:
> On Sun, Nov 10, 2013 at 09:46:02PM +0100, Tomasz Figa wrote:
> [...]
> > On Tuesday 29 of October 2013 12:12:59 Sean Paul wrote:
> [...]
> > [snip]
> > > @@ -1957,21 +1943,30 @@ static int hdmi_probe(struct platform_device 
> > > *pdev)
> > >   }
> > >  
> > >   /* DDC i2c driver */
> > > - if (i2c_add_driver(&ddc_driver)) {
> > > - DRM_ERROR("failed to register ddc i2c driver\n");
> > > - return -ENOENT;
> > > + ddc_node = of_find_node_by_name(NULL, "hdmiddc");
> > 
> > This is wrong. You shall not reference a device tree node by its name,
> > except some very specific well-defined cases, such as cpus or memory
> > nodes.
> > 
> > A solution closest to yours, but correct, would be to use the same match
> > table as in the I2C driver you are removing and call
> > of_find_matching_node().
> 
> Isn't the correct solution to use a phandle? That might need the binding
> to change in a backwards incompatible way.

Yes, phandle is an even better option as it can point you precisely to the
node you are interested in, but this will be incompatible, meaning that
you would have to support both variants anyway.

> Then again, if something as
> simple as specifying a DDC I2C bus causes the binding to change in a
> backwards incompatible way then it can't have been a very good binding
> in the first place, right? +1 for unstable DT bindings...

Well, some of already existing bindings should have been definitely marked
unstable, as they haven't been thought and reviewed well enough, if at all
(especially reviewed, as we only started seriously reviewing DT bindings
not so long ago).

Honestly, I'm not quite sure about this binding in particular, especially
how much it would be a problem if we broke compatibility. I mean, how much
tied to old DTBs are existing boards using this binding. The affected
boards are:
 - exynos5250-snow,
 - exynos5250-arndale,
 - exynos5250-smdk5250,
 - exynos5420-smdk5420.
The last three are most likely to be used only with DTB appended, so
I don't think that anyone would complain. However I'm not sure about the
first one, which is supposed to be a Chromebook if I'm not mistaken.

Best regards,
Tomasz



[PATCH 1/3] drm/vmwgfx: Correctly set the enabled state on crtcs

2013-11-28 Thread Thomas Hellstrom
Failure to do this would make the drm_mode_get_crtc ioctl return
without crtc mode info, indicating that no mode was set.

Signed-off-by: Thomas Hellstrom 
Reviewed-by: Jakob Bornecrantz 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c  |2 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c |3 +++
 2 files changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index 79f7e8e..c11ddc5 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -260,6 +260,7 @@ static int vmw_ldu_crtc_set_config(struct drm_mode_set *set)
connector->encoder = NULL;
encoder->crtc = NULL;
crtc->fb = NULL;
+   crtc->enabled = false;

vmw_ldu_del_active(dev_priv, ldu);

@@ -285,6 +286,7 @@ static int vmw_ldu_crtc_set_config(struct drm_mode_set *set)
crtc->x = set->x;
crtc->y = set->y;
crtc->mode = *mode;
+   crtc->enabled = true;

vmw_ldu_add_active(dev_priv, ldu, vfb);

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 26387c3..31c6ef3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -310,6 +310,7 @@ static int vmw_sou_crtc_set_config(struct drm_mode_set *set)
crtc->fb = NULL;
crtc->x = 0;
crtc->y = 0;
+   crtc->enabled = false;

vmw_sou_del_active(dev_priv, sou);

@@ -370,6 +371,7 @@ static int vmw_sou_crtc_set_config(struct drm_mode_set *set)
crtc->fb = NULL;
crtc->x = 0;
crtc->y = 0;
+   crtc->enabled = false;

return ret;
}
@@ -382,6 +384,7 @@ static int vmw_sou_crtc_set_config(struct drm_mode_set *set)
crtc->fb = fb;
crtc->x = set->x;
crtc->y = set->y;
+   crtc->enabled = true;

return 0;
 }
-- 
1.7.10.4


[PATCH 3/3] drm/vmwgfx: Fix dma buffer memory size accounting

2013-11-28 Thread Thomas Hellstrom
Also request kernel ttm_buffer objects for buffer objects that obviously
aren't visible to user-space, and save some device address space.

The accounting was broken in a couple of ways:
1) We did not differentiate between user dma buffers and kernel dma buffers.
2) The ttm_bo_acc_size function is broken in that it
a) Doesn't take into account the size of the optional dma address array,
b) Doesn't take into account the fact that drivers typically embed the
ttm_tt structure.

This needs to be fixed in ttm, but meanwhile provide a vmwgfx-specific
function to do the job.

Signed-off-by: Thomas Hellstrom 
Reviewed-by: Jakob Bornecrantz 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c   |2 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h  |1 +
 drivers/gpu/drm/vmwgfx/vmwgfx_resource.c |   54 --
 3 files changed, 47 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
index 7776e6f..0489c61 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
@@ -150,6 +150,8 @@ struct vmw_ttm_tt {
bool mapped;
 };

+const size_t vmw_tt_size = sizeof(struct vmw_ttm_tt);
+
 /**
  * Helper functions to advance a struct vmw_piter iterator.
  *
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index db85985..20890ad 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -615,6 +615,7 @@ extern int vmw_mmap(struct file *filp, struct 
vm_area_struct *vma);
  * TTM buffer object driver - vmwgfx_buffer.c
  */

+extern const size_t vmw_tt_size;
 extern struct ttm_placement vmw_vram_placement;
 extern struct ttm_placement vmw_vram_ne_placement;
 extern struct ttm_placement vmw_vram_sys_placement;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index 4381e27..9b5ea2a 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -352,6 +352,38 @@ int vmw_user_lookup_handle(struct vmw_private *dev_priv,
 /**
  * Buffer management.
  */
+
+/**
+ * vmw_dmabuf_acc_size - Calculate the pinned memory usage of buffers
+ *
+ * @dev_priv: Pointer to a struct vmw_private identifying the device.
+ * @size: The requested buffer size.
+ * @user: Whether this is an ordinary dma buffer or a user dma buffer.
+ */
+static size_t vmw_dmabuf_acc_size(struct vmw_private *dev_priv, size_t size,
+ bool user)
+{
+   static size_t struct_size, user_struct_size;
+   size_t num_pages = PAGE_ALIGN(size) >> PAGE_SHIFT;
+   size_t page_array_size = ttm_round_pot(num_pages * sizeof(void *));
+
+   if (unlikely(struct_size == 0)) {
+   size_t backend_size = ttm_round_pot(vmw_tt_size);
+
+   struct_size = backend_size +
+   ttm_round_pot(sizeof(struct vmw_dma_buffer));
+   user_struct_size = backend_size +
+   ttm_round_pot(sizeof(struct vmw_user_dma_buffer));
+   }
+
+   if (dev_priv->map_mode == vmw_dma_alloc_coherent)
+   page_array_size +=
+   ttm_round_pot(num_pages * sizeof(dma_addr_t));
+
+   return ((user) ? user_struct_size : struct_size) +
+   page_array_size;
+}
+
 void vmw_dmabuf_bo_free(struct ttm_buffer_object *bo)
 {
struct vmw_dma_buffer *vmw_bo = vmw_dma_buffer(bo);
@@ -359,6 +391,13 @@ void vmw_dmabuf_bo_free(struct ttm_buffer_object *bo)
kfree(vmw_bo);
 }

+static void vmw_user_dmabuf_destroy(struct ttm_buffer_object *bo)
+{
+   struct vmw_user_dma_buffer *vmw_user_bo = vmw_user_dma_buffer(bo);
+
+   ttm_prime_object_kfree(vmw_user_bo, prime);
+}
+
 int vmw_dmabuf_init(struct vmw_private *dev_priv,
struct vmw_dma_buffer *vmw_bo,
size_t size, struct ttm_placement *placement,
@@ -368,28 +407,23 @@ int vmw_dmabuf_init(struct vmw_private *dev_priv,
struct ttm_bo_device *bdev = &dev_priv->bdev;
size_t acc_size;
int ret;
+   bool user = (bo_free == &vmw_user_dmabuf_destroy);

-   BUG_ON(!bo_free);
+   BUG_ON(!bo_free && (!user && (bo_free != vmw_dmabuf_bo_free)));

-   acc_size = ttm_bo_acc_size(bdev, size, sizeof(struct vmw_dma_buffer));
+   acc_size = vmw_dmabuf_acc_size(dev_priv, size, user);
memset(vmw_bo, 0, sizeof(*vmw_bo));

INIT_LIST_HEAD(&vmw_bo->res_list);

ret = ttm_bo_init(bdev, &vmw_bo->base, size,
- ttm_bo_type_device, placement,
+ (user) ? ttm_bo_type_device :
+ ttm_bo_type_kernel, placement,
  0, interruptible,
  NULL, acc_size, NULL, bo_free);
return ret;
 }

-static void vmw_user_dmabuf_destroy(struct ttm_buffer_object *bo)
-{
-   struct vmw_user_dma_buffer *vmw_user_bo = vmw_user_dma_buffer

[PATCH 2/3] drm/vmwgfx: Fix up and comment the dumb buffer implementation

2013-11-28 Thread Thomas Hellstrom
Allocation was duplicating code. Comments were missing.

Signed-off-by: Thomas Hellstrom 
Reviewed-by: Jakob Bornecrantz 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_resource.c |   64 +-
 1 file changed, 37 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index efe2b74..4381e27 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -781,54 +781,55 @@ err_ref:
 }


+/**
+ * vmw_dumb_create - Create a dumb kms buffer
+ *
+ * @file_priv: Pointer to a struct drm_file identifying the caller.
+ * @dev: Pointer to the drm device.
+ * @args: Pointer to a struct drm_mode_create_dumb structure
+ *
+ * This is a driver callback for the core drm create_dumb functionality.
+ * Note that this is very similar to the vmw_dmabuf_alloc ioctl, except
+ * that the arguments have a different format.
+ */
 int vmw_dumb_create(struct drm_file *file_priv,
struct drm_device *dev,
struct drm_mode_create_dumb *args)
 {
struct vmw_private *dev_priv = vmw_priv(dev);
struct vmw_master *vmaster = vmw_master(file_priv->master);
-   struct vmw_user_dma_buffer *vmw_user_bo;
-   struct ttm_buffer_object *tmp;
+   struct vmw_dma_buffer *dma_buf;
int ret;

args->pitch = args->width * ((args->bpp + 7) / 8);
args->size = args->pitch * args->height;

-   vmw_user_bo = kzalloc(sizeof(*vmw_user_bo), GFP_KERNEL);
-   if (vmw_user_bo == NULL)
-   return -ENOMEM;
-
ret = ttm_read_lock(&vmaster->lock, true);
-   if (ret != 0) {
-   kfree(vmw_user_bo);
+   if (unlikely(ret != 0))
return ret;
-   }
-
-   ret = vmw_dmabuf_init(dev_priv, &vmw_user_bo->dma, args->size,
- &vmw_vram_sys_placement, true,
- &vmw_user_dmabuf_destroy);
-   if (ret != 0)
-   goto out_no_dmabuf;

-   tmp = ttm_bo_reference(&vmw_user_bo->dma.base);
-   ret = ttm_prime_object_init(vmw_fpriv(file_priv)->tfile,
-   args->size,
-   &vmw_user_bo->prime,
-   false,
-   ttm_buffer_type,
-   &vmw_user_dmabuf_release, NULL);
+   ret = vmw_user_dmabuf_alloc(dev_priv, vmw_fpriv(file_priv)->tfile,
+   args->size, false, &args->handle,
+   &dma_buf);
if (unlikely(ret != 0))
-   goto out_no_base_object;
-
-   args->handle = vmw_user_bo->prime.base.hash.key;
+   goto out_no_dmabuf;

-out_no_base_object:
-   ttm_bo_unref(&tmp);
+   vmw_dmabuf_unreference(&dma_buf);
 out_no_dmabuf:
ttm_read_unlock(&vmaster->lock);
return ret;
 }

+/**
+ * vmw_dumb_map_offset - Return the address space offset of a dumb buffer
+ *
+ * @file_priv: Pointer to a struct drm_file identifying the caller.
+ * @dev: Pointer to the drm device.
+ * @handle: Handle identifying the dumb buffer.
+ * @offset: The address space offset returned.
+ *
+ * This is a driver callback for the core drm dumb_map_offset functionality.
+ */
 int vmw_dumb_map_offset(struct drm_file *file_priv,
struct drm_device *dev, uint32_t handle,
uint64_t *offset)
@@ -846,6 +847,15 @@ int vmw_dumb_map_offset(struct drm_file *file_priv,
return 0;
 }

+/**
+ * vmw_dumb_destroy - Destroy a dumb boffer
+ *
+ * @file_priv: Pointer to a struct drm_file identifying the caller.
+ * @dev: Pointer to the drm device.
+ * @handle: Handle identifying the dumb buffer.
+ *
+ * This is a driver callback for the core drm dumb_destroy functionality.
+ */
 int vmw_dumb_destroy(struct drm_file *file_priv,
 struct drm_device *dev,
 uint32_t handle)
-- 
1.7.10.4


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

2013-11-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=69723

--- Comment #47 from Alexandre Demers  ---
Latest news: tried to force VDDC to 1100 (some 6950 cards are using 1.1V
instead of 1.06V, mostly factory overclocked ones), tried to force VDDCI to
1150 for all power levels (crashed even quicker), tried to force VDDCI to 1100
for high power level just in case (hanged as usual after mostly the same
delay).

So I turned my attention on mclk and downclocked it to 12 (instead of
125000). Until now, the auto power level runs fine. I'll tweak it until I can
find out at which value it begins to hang... and why it hangs mostly on auto
power level and almost never on high or low (even at high, which is mostly as
if dpm was disabled)... and never under Windows.

-- 
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/20131128/385d3bc3/attachment.html>


[PATCH 1/2] drm: Make the connector mode_valid() vfunc return a drm_mode_status enum

2013-11-28 Thread Damien Lespiau
To make it clear what exactly mode_valid() should return.

Signed-off-by: Damien Lespiau 
---
 include/drm/drm_crtc_helper.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index ef6ad3a..b1388b5 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -120,8 +120,8 @@ struct drm_encoder_helper_funcs {
  */
 struct drm_connector_helper_funcs {
int (*get_modes)(struct drm_connector *connector);
-   int (*mode_valid)(struct drm_connector *connector,
- struct drm_display_mode *mode);
+   enum drm_mode_status (*mode_valid)(struct drm_connector *connector,
+  struct drm_display_mode *mode);
struct drm_encoder *(*best_encoder)(struct drm_connector *connector);
 };

-- 
1.8.3.1



[PATCH 2/2] drm/i915: Return a drm_mode_status enum in the mode_valid vfuncs

2013-11-28 Thread Damien Lespiau
We had some mode_valid() vfuncs returning an int, others the enum. Let's
use the latter everywhere.

Signed-off-by: Damien Lespiau 
---
 drivers/gpu/drm/i915/intel_crt.c  | 5 +++--
 drivers/gpu/drm/i915/intel_dp.c   | 2 +-
 drivers/gpu/drm/i915/intel_dsi.c  | 5 +++--
 drivers/gpu/drm/i915/intel_dvo.c  | 5 +++--
 drivers/gpu/drm/i915/intel_hdmi.c | 5 +++--
 drivers/gpu/drm/i915/intel_lvds.c | 5 +++--
 drivers/gpu/drm/i915/intel_sdvo.c | 5 +++--
 7 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index b5b1b9b..e2e39e6 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -222,8 +222,9 @@ static void intel_crt_dpms(struct drm_connector *connector, 
int mode)
intel_modeset_check_state(connector->dev);
 }

-static int intel_crt_mode_valid(struct drm_connector *connector,
-   struct drm_display_mode *mode)
+static enum drm_mode_status
+intel_crt_mode_valid(struct drm_connector *connector,
+struct drm_display_mode *mode)
 {
struct drm_device *dev = connector->dev;

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index c36a227..7c54f62 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -142,7 +142,7 @@ intel_dp_max_data_rate(int max_link_clock, int max_lanes)
return (max_link_clock * max_lanes * 8) / 10;
 }

-static int
+static enum drm_mode_status
 intel_dp_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
 {
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index d257b09..7b9b350 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -251,8 +251,9 @@ static void intel_dsi_get_config(struct intel_encoder 
*encoder,
/* XXX: read flags, set to adjusted_mode */
 }

-static int intel_dsi_mode_valid(struct drm_connector *connector,
-   struct drm_display_mode *mode)
+static enum drm_mode_status
+intel_dsi_mode_valid(struct drm_connector *connector,
+struct drm_display_mode *mode)
 {
struct intel_connector *intel_connector = to_intel_connector(connector);
struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index 3c77365..eeff998 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -234,8 +234,9 @@ static void intel_dvo_dpms(struct drm_connector *connector, 
int mode)
intel_modeset_check_state(connector->dev);
 }

-static int intel_dvo_mode_valid(struct drm_connector *connector,
-   struct drm_display_mode *mode)
+static enum drm_mode_status
+intel_dvo_mode_valid(struct drm_connector *connector,
+struct drm_display_mode *mode)
 {
struct intel_dvo *intel_dvo = intel_attached_dvo(connector);

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c 
b/drivers/gpu/drm/i915/intel_hdmi.c
index d0c81b1..6a6ad0c 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -853,8 +853,9 @@ static int hdmi_portclock_limit(struct intel_hdmi *hdmi)
return 225000;
 }

-static int intel_hdmi_mode_valid(struct drm_connector *connector,
-struct drm_display_mode *mode)
+static enum drm_mode_status
+intel_hdmi_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
 {
if (mode->clock > hdmi_portclock_limit(intel_attached_hdmi(connector)))
return MODE_CLOCK_HIGH;
diff --git a/drivers/gpu/drm/i915/intel_lvds.c 
b/drivers/gpu/drm/i915/intel_lvds.c
index c3b4da7..3deb58e 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -256,8 +256,9 @@ static void intel_disable_lvds(struct intel_encoder 
*encoder)
POSTING_READ(lvds_encoder->reg);
 }

-static int intel_lvds_mode_valid(struct drm_connector *connector,
-struct drm_display_mode *mode)
+static enum drm_mode_status
+intel_lvds_mode_valid(struct drm_connector *connector,
+ struct drm_display_mode *mode)
 {
struct intel_connector *intel_connector = to_intel_connector(connector);
struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c 
b/drivers/gpu/drm/i915/intel_sdvo.c
index e4f9918..2abeab0 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1536,8 +1536,9 @@ static void intel_sdvo_dpms(struct drm_connector 
*connector, int mode)
intel_modeset_check_state(connector->dev);
 }

-static int intel_sdvo_mode_valid(struct drm_connector *connector,
-struct drm_display_mode *mode)
+static enum d

[PATCH] drm: fix the addition of the side-by-side (half) flag for extra 3D modes

2013-11-28 Thread Thomas Wood
Ensure the side-by-side (half) flag is added to any existing flags when
adding modes from 3D_Structure_ALL.

Signed-off-by: Thomas Wood 
---
 drivers/gpu/drm/drm_edid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index fb7cf0e..52e060e 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2701,7 +2701,7 @@ static int add_3d_struct_modes(struct drm_connector 
*connector, u16 structure,
if (structure & (1 << 8)) {
newmode = drm_mode_duplicate(dev, &edid_cea_modes[cea_mode]);
if (newmode) {
-   newmode->flags = DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF;
+   newmode->flags |= DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF;
drm_mode_probed_add(connector, newmode);
modes++;
}
-- 
1.8.4.2



[Bug 71796] Hardware assisted (VDPAU) decoding of MPEG-2 causes GPU lockup - Radeon HD6950

2013-11-28 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=71796

libgradev at gmail.com changed:

   What|Removed |Added

  Component|Drivers/DRI/R600|Drivers/Gallium/r600

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


[PATCH] drm: fix the addition of the side-by-side (half) flag for extra 3D modes

2013-11-28 Thread Ville Syrjälä
On Thu, Nov 28, 2013 at 03:35:04PM +, Thomas Wood wrote:
> Ensure the side-by-side (half) flag is added to any existing flags when
> adding modes from 3D_Structure_ALL.
> 
> Signed-off-by: Thomas Wood 

Reviewed-by: Ville Syrj?l? 

> ---
>  drivers/gpu/drm/drm_edid.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index fb7cf0e..52e060e 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2701,7 +2701,7 @@ static int add_3d_struct_modes(struct drm_connector 
> *connector, u16 structure,
>   if (structure & (1 << 8)) {
>   newmode = drm_mode_duplicate(dev, &edid_cea_modes[cea_mode]);
>   if (newmode) {
> - newmode->flags = DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF;
> + newmode->flags |= DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF;
>   drm_mode_probed_add(connector, newmode);
>   modes++;
>   }
> -- 
> 1.8.4.2
> 
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrj?l?
Intel OTC


[Intel-gfx] [PATCH 1/2] drm: Make the connector mode_valid() vfunc return a drm_mode_status enum

2013-11-28 Thread Daniel Vetter
On Thu, Nov 28, 2013 at 03:29:17PM +, Damien Lespiau wrote:
> To make it clear what exactly mode_valid() should return.
> 
> Signed-off-by: Damien Lespiau 

Reviewed-by: Daniel Vetter 
> ---
>  include/drm/drm_crtc_helper.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
> index ef6ad3a..b1388b5 100644
> --- a/include/drm/drm_crtc_helper.h
> +++ b/include/drm/drm_crtc_helper.h
> @@ -120,8 +120,8 @@ struct drm_encoder_helper_funcs {
>   */
>  struct drm_connector_helper_funcs {
>   int (*get_modes)(struct drm_connector *connector);
> - int (*mode_valid)(struct drm_connector *connector,
> -   struct drm_display_mode *mode);
> + enum drm_mode_status (*mode_valid)(struct drm_connector *connector,
> +struct drm_display_mode *mode);
>   struct drm_encoder *(*best_encoder)(struct drm_connector *connector);
>  };
>  
> -- 
> 1.8.3.1
> 
> ___
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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


[PATCH 2/2] drm/i915: Return a drm_mode_status enum in the mode_valid vfuncs

2013-11-28 Thread Daniel Vetter
On Thu, Nov 28, 2013 at 03:29:18PM +, Damien Lespiau wrote:
> We had some mode_valid() vfuncs returning an int, others the enum. Let's
> use the latter everywhere.
> 
> Signed-off-by: Damien Lespiau 

Yeah, makes sense. Queued for -next, thanks for the patch.
-Daniel
> ---
>  drivers/gpu/drm/i915/intel_crt.c  | 5 +++--
>  drivers/gpu/drm/i915/intel_dp.c   | 2 +-
>  drivers/gpu/drm/i915/intel_dsi.c  | 5 +++--
>  drivers/gpu/drm/i915/intel_dvo.c  | 5 +++--
>  drivers/gpu/drm/i915/intel_hdmi.c | 5 +++--
>  drivers/gpu/drm/i915/intel_lvds.c | 5 +++--
>  drivers/gpu/drm/i915/intel_sdvo.c | 5 +++--
>  7 files changed, 19 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_crt.c 
> b/drivers/gpu/drm/i915/intel_crt.c
> index b5b1b9b..e2e39e6 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -222,8 +222,9 @@ static void intel_crt_dpms(struct drm_connector 
> *connector, int mode)
>   intel_modeset_check_state(connector->dev);
>  }
>  
> -static int intel_crt_mode_valid(struct drm_connector *connector,
> - struct drm_display_mode *mode)
> +static enum drm_mode_status
> +intel_crt_mode_valid(struct drm_connector *connector,
> +  struct drm_display_mode *mode)
>  {
>   struct drm_device *dev = connector->dev;
>  
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index c36a227..7c54f62 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -142,7 +142,7 @@ intel_dp_max_data_rate(int max_link_clock, int max_lanes)
>   return (max_link_clock * max_lanes * 8) / 10;
>  }
>  
> -static int
> +static enum drm_mode_status
>  intel_dp_mode_valid(struct drm_connector *connector,
>   struct drm_display_mode *mode)
>  {
> diff --git a/drivers/gpu/drm/i915/intel_dsi.c 
> b/drivers/gpu/drm/i915/intel_dsi.c
> index d257b09..7b9b350 100644
> --- a/drivers/gpu/drm/i915/intel_dsi.c
> +++ b/drivers/gpu/drm/i915/intel_dsi.c
> @@ -251,8 +251,9 @@ static void intel_dsi_get_config(struct intel_encoder 
> *encoder,
>   /* XXX: read flags, set to adjusted_mode */
>  }
>  
> -static int intel_dsi_mode_valid(struct drm_connector *connector,
> - struct drm_display_mode *mode)
> +static enum drm_mode_status
> +intel_dsi_mode_valid(struct drm_connector *connector,
> +  struct drm_display_mode *mode)
>  {
>   struct intel_connector *intel_connector = to_intel_connector(connector);
>   struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
> diff --git a/drivers/gpu/drm/i915/intel_dvo.c 
> b/drivers/gpu/drm/i915/intel_dvo.c
> index 3c77365..eeff998 100644
> --- a/drivers/gpu/drm/i915/intel_dvo.c
> +++ b/drivers/gpu/drm/i915/intel_dvo.c
> @@ -234,8 +234,9 @@ static void intel_dvo_dpms(struct drm_connector 
> *connector, int mode)
>   intel_modeset_check_state(connector->dev);
>  }
>  
> -static int intel_dvo_mode_valid(struct drm_connector *connector,
> - struct drm_display_mode *mode)
> +static enum drm_mode_status
> +intel_dvo_mode_valid(struct drm_connector *connector,
> +  struct drm_display_mode *mode)
>  {
>   struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
>  
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c 
> b/drivers/gpu/drm/i915/intel_hdmi.c
> index d0c81b1..6a6ad0c 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -853,8 +853,9 @@ static int hdmi_portclock_limit(struct intel_hdmi *hdmi)
>   return 225000;
>  }
>  
> -static int intel_hdmi_mode_valid(struct drm_connector *connector,
> -  struct drm_display_mode *mode)
> +static enum drm_mode_status
> +intel_hdmi_mode_valid(struct drm_connector *connector,
> +   struct drm_display_mode *mode)
>  {
>   if (mode->clock > hdmi_portclock_limit(intel_attached_hdmi(connector)))
>   return MODE_CLOCK_HIGH;
> diff --git a/drivers/gpu/drm/i915/intel_lvds.c 
> b/drivers/gpu/drm/i915/intel_lvds.c
> index c3b4da7..3deb58e 100644
> --- a/drivers/gpu/drm/i915/intel_lvds.c
> +++ b/drivers/gpu/drm/i915/intel_lvds.c
> @@ -256,8 +256,9 @@ static void intel_disable_lvds(struct intel_encoder 
> *encoder)
>   POSTING_READ(lvds_encoder->reg);
>  }
>  
> -static int intel_lvds_mode_valid(struct drm_connector *connector,
> -  struct drm_display_mode *mode)
> +static enum drm_mode_status
> +intel_lvds_mode_valid(struct drm_connector *connector,
> +   struct drm_display_mode *mode)
>  {
>   struct intel_connector *intel_connector = to_intel_connector(connector);
>   struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode;
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c 
> b/drivers/gpu/drm/i915/intel_sdvo.c
> index e4f9918..2abeab0 100644
> --- a/drivers/gpu/drm/i915/intel_sdvo.c
>

Parse the list of additional 3D modes

2013-11-28 Thread Thomas Wood
Hi,

The following two patches add support for parsing the list of additional 3D
modes at the end of the vendor specific data block. The first splits the VIC
display mode lookup into a separate function so that it can be reused. The
second patch parses the list, adding any support modes to the connector.

Regards,

Thomas



[PATCH 1/2] drm/edid: split VIC display mode lookup into a separate function

2013-11-28 Thread Thomas Wood
Signed-off-by: Thomas Wood 
---
 drivers/gpu/drm/drm_edid.c | 67 +++---
 1 file changed, 39 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 52e060e..1dd82cd 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2557,25 +2557,40 @@ add_alternate_cea_modes(struct drm_connector 
*connector, struct edid *edid)
return modes;
 }

-static int
-do_cea_modes(struct drm_connector *connector, const u8 *db, u8 len)
+static struct drm_display_mode *
+drm_display_mode_from_vic_index(struct drm_connector *connector,
+   const u8 *video_db, u8 video_len,
+   u8 video_index)
 {
struct drm_device *dev = connector->dev;
-   const u8 *mode;
+   struct drm_display_mode *newmode;
u8 cea_mode;
-   int modes = 0;

-   for (mode = db; mode < db + len; mode++) {
-   cea_mode = (*mode & 127) - 1; /* CEA modes are numbered 1..127 
*/
-   if (cea_mode < ARRAY_SIZE(edid_cea_modes)) {
-   struct drm_display_mode *newmode;
-   newmode = drm_mode_duplicate(dev,
-&edid_cea_modes[cea_mode]);
-   if (newmode) {
-   newmode->vrefresh = 0;
-   drm_mode_probed_add(connector, newmode);
-   modes++;
-   }
+   if (video_db == NULL || video_index > video_len)
+   return NULL;
+
+   /* CEA modes are numbered 1..127 */
+   cea_mode = (video_db[video_index] & 127) - 1;
+   if (cea_mode >= ARRAY_SIZE(edid_cea_modes))
+   return NULL;
+
+   newmode = drm_mode_duplicate(dev, &edid_cea_modes[cea_mode]);
+   newmode->vrefresh = 0;
+
+   return newmode;
+}
+
+static int
+do_cea_modes(struct drm_connector *connector, const u8 *db, u8 len)
+{
+   int i, modes = 0;
+
+   for (i = 0; i < len; i++) {
+   struct drm_display_mode *mode;
+   mode = drm_display_mode_from_vic_index(connector, db, len, i);
+   if (mode) {
+   drm_mode_probed_add(connector, mode);
+   modes++;
}
}

@@ -2669,21 +2684,13 @@ static int add_hdmi_mode(struct drm_connector 
*connector, u8 vic)
 static int add_3d_struct_modes(struct drm_connector *connector, u16 structure,
   const u8 *video_db, u8 video_len, u8 video_index)
 {
-   struct drm_device *dev = connector->dev;
struct drm_display_mode *newmode;
int modes = 0;
-   u8 cea_mode;
-
-   if (video_db == NULL || video_index > video_len)
-   return 0;
-
-   /* CEA modes are numbered 1..127 */
-   cea_mode = (video_db[video_index] & 127) - 1;
-   if (cea_mode >= ARRAY_SIZE(edid_cea_modes))
-   return 0;

if (structure & (1 << 0)) {
-   newmode = drm_mode_duplicate(dev, &edid_cea_modes[cea_mode]);
+   newmode = drm_display_mode_from_vic_index(connector, video_db,
+ video_len,
+ video_index);
if (newmode) {
newmode->flags |= DRM_MODE_FLAG_3D_FRAME_PACKING;
drm_mode_probed_add(connector, newmode);
@@ -2691,7 +2698,9 @@ static int add_3d_struct_modes(struct drm_connector 
*connector, u16 structure,
}
}
if (structure & (1 << 6)) {
-   newmode = drm_mode_duplicate(dev, &edid_cea_modes[cea_mode]);
+   newmode = drm_display_mode_from_vic_index(connector, video_db,
+ video_len,
+ video_index);
if (newmode) {
newmode->flags |= DRM_MODE_FLAG_3D_TOP_AND_BOTTOM;
drm_mode_probed_add(connector, newmode);
@@ -2699,7 +2708,9 @@ static int add_3d_struct_modes(struct drm_connector 
*connector, u16 structure,
}
}
if (structure & (1 << 8)) {
-   newmode = drm_mode_duplicate(dev, &edid_cea_modes[cea_mode]);
+   newmode = drm_display_mode_from_vic_index(connector, video_db,
+ video_len,
+ video_index);
if (newmode) {
newmode->flags |= DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF;
drm_mode_probed_add(connector, newmode);
-- 
1.8.4.2



[PATCH 2/2] drm/edid: parse the list of additional 3D modes

2013-11-28 Thread Thomas Wood
Parse 2D_VIC_order_X and 3D_Structure_X from the list at the end of the
HDMI Vendor Specific Data Block.

Signed-off-by: Thomas Wood 
---
 drivers/gpu/drm/drm_edid.c | 50 ++
 1 file changed, 50 insertions(+)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 1dd82cd..eb6b363 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -2808,6 +2808,56 @@ do_hdmi_vsdb_modes(struct drm_connector *connector, 
const u8 *db, u8 len,
 video_len, i);
}

+   if (hdmi_3d_len <= 4)
+   goto out;
+
+   offset += 4;
+
+   for (i = 0; i < (hdmi_3d_len - 4); i++) {
+   int vic_index;
+   struct drm_display_mode *newmode = NULL;
+   unsigned int newflag = 0;
+
+   if (((db[8 + offset + i] & 0x0f) > 7)
+   && (i + 1 == hdmi_3d_len - 4))
+   break;
+
+   /* 2D_VIC_order_X */
+   vic_index = db[8 + offset + i] >> 4;
+
+   /* 3D_Structure_X */
+   switch (db[8 + offset + i] & 0x0f) {
+   case 0:
+   newflag = DRM_MODE_FLAG_3D_FRAME_PACKING;
+   break;
+   case 6:
+   newflag = DRM_MODE_FLAG_3D_TOP_AND_BOTTOM;
+   break;
+   case 8:
+   if ((db[9 + offset + i] >> 4) == 1)
+   newflag = DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF;
+   break;
+   }
+
+   if (newflag != 0) {
+   newmode = drm_display_mode_from_vic_index(connector,
+ video_db,
+ video_len,
+ vic_index);
+
+   if (newmode) {
+   newmode->flags |= newflag;
+   drm_mode_probed_add(connector, newmode);
+   modes++;
+   }
+   }
+
+   if ((db[8 + offset + i] & 0x0f) > 7) {
+   /* Optional 3D_Detail_X and reserved */
+   i++;
+   }
+   }
+
 out:
return modes;
 }
-- 
1.8.4.2



[PATCH 1/2] drm/edid: split VIC display mode lookup into a separate function

2013-11-28 Thread Ville Syrjälä
On Thu, Nov 28, 2013 at 05:12:46PM +, Thomas Wood wrote:
> Signed-off-by: Thomas Wood 
> ---
>  drivers/gpu/drm/drm_edid.c | 67 
> +++---
>  1 file changed, 39 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 52e060e..1dd82cd 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2557,25 +2557,40 @@ add_alternate_cea_modes(struct drm_connector 
> *connector, struct edid *edid)
>   return modes;
>  }
>  
> -static int
> -do_cea_modes(struct drm_connector *connector, const u8 *db, u8 len)
> +static struct drm_display_mode *
> +drm_display_mode_from_vic_index(struct drm_connector *connector,
> + const u8 *video_db, u8 video_len,
> + u8 video_index)
>  {
>   struct drm_device *dev = connector->dev;
> - const u8 *mode;
> + struct drm_display_mode *newmode;
>   u8 cea_mode;
> - int modes = 0;
>  
> - for (mode = db; mode < db + len; mode++) {
> - cea_mode = (*mode & 127) - 1; /* CEA modes are numbered 1..127 
> */
> - if (cea_mode < ARRAY_SIZE(edid_cea_modes)) {
> - struct drm_display_mode *newmode;
> - newmode = drm_mode_duplicate(dev,
> -  &edid_cea_modes[cea_mode]);
> - if (newmode) {
> - newmode->vrefresh = 0;
> - drm_mode_probed_add(connector, newmode);
> - modes++;
> - }
> + if (video_db == NULL || video_index > video_len)
> + return NULL;

Hmm, this seems wrong. video_len is the length of the payload only,
so the check should be >=. But this bug is already present in
the current code in add_3d_struct_modes(). So maybe include another
patch to fix that up first.

The rest looks OK to me.

> +
> + /* CEA modes are numbered 1..127 */
> + cea_mode = (video_db[video_index] & 127) - 1;
> + if (cea_mode >= ARRAY_SIZE(edid_cea_modes))
> + return NULL;
> +
> + newmode = drm_mode_duplicate(dev, &edid_cea_modes[cea_mode]);
> + newmode->vrefresh = 0;
> +
> + return newmode;
> +}
> +
> +static int
> +do_cea_modes(struct drm_connector *connector, const u8 *db, u8 len)
> +{
> + int i, modes = 0;
> +
> + for (i = 0; i < len; i++) {
> + struct drm_display_mode *mode;
> + mode = drm_display_mode_from_vic_index(connector, db, len, i);
> + if (mode) {
> + drm_mode_probed_add(connector, mode);
> + modes++;
>   }
>   }
>  
> @@ -2669,21 +2684,13 @@ static int add_hdmi_mode(struct drm_connector 
> *connector, u8 vic)
>  static int add_3d_struct_modes(struct drm_connector *connector, u16 
> structure,
>  const u8 *video_db, u8 video_len, u8 video_index)
>  {
> - struct drm_device *dev = connector->dev;
>   struct drm_display_mode *newmode;
>   int modes = 0;
> - u8 cea_mode;
> -
> - if (video_db == NULL || video_index > video_len)
> - return 0;
> -
> - /* CEA modes are numbered 1..127 */
> - cea_mode = (video_db[video_index] & 127) - 1;
> - if (cea_mode >= ARRAY_SIZE(edid_cea_modes))
> - return 0;
>  
>   if (structure & (1 << 0)) {
> - newmode = drm_mode_duplicate(dev, &edid_cea_modes[cea_mode]);
> + newmode = drm_display_mode_from_vic_index(connector, video_db,
> +   video_len,
> +   video_index);
>   if (newmode) {
>   newmode->flags |= DRM_MODE_FLAG_3D_FRAME_PACKING;
>   drm_mode_probed_add(connector, newmode);
> @@ -2691,7 +2698,9 @@ static int add_3d_struct_modes(struct drm_connector 
> *connector, u16 structure,
>   }
>   }
>   if (structure & (1 << 6)) {
> - newmode = drm_mode_duplicate(dev, &edid_cea_modes[cea_mode]);
> + newmode = drm_display_mode_from_vic_index(connector, video_db,
> +   video_len,
> +   video_index);
>   if (newmode) {
>   newmode->flags |= DRM_MODE_FLAG_3D_TOP_AND_BOTTOM;
>   drm_mode_probed_add(connector, newmode);
> @@ -2699,7 +2708,9 @@ static int add_3d_struct_modes(struct drm_connector 
> *connector, u16 structure,
>   }
>   }
>   if (structure & (1 << 8)) {
> - newmode = drm_mode_duplicate(dev, &edid_cea_modes[cea_mode]);
> + newmode = drm_display_mode_from_vic_index(connector, video_db,
> +   video_len,
> + 

[PATCH 2/2] drm/edid: parse the list of additional 3D modes

2013-11-28 Thread Ville Syrjälä
On Thu, Nov 28, 2013 at 05:12:47PM +, Thomas Wood wrote:
> Parse 2D_VIC_order_X and 3D_Structure_X from the list at the end of the
> HDMI Vendor Specific Data Block.
> 
> Signed-off-by: Thomas Wood 
> ---
>  drivers/gpu/drm/drm_edid.c | 50 
> ++
>  1 file changed, 50 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 1dd82cd..eb6b363 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -2808,6 +2808,56 @@ do_hdmi_vsdb_modes(struct drm_connector *connector, 
> const u8 *db, u8 len,
>video_len, i);
>   }
>  
> + if (hdmi_3d_len <= 4)

This number 4 should depend on the value of multi_present, no?

Also we haven't actually verified that all hdmi_3d_len bytes
fit within the data block. If you do that a bit earlier, you
could also skip the explicit 'len' checks for the
multi_present cases since we also check those against
hdmi_3d_len.

> + goto out;
> +
> + offset += 4;
> +
> + for (i = 0; i < (hdmi_3d_len - 4); i++) {
> + int vic_index;
> + struct drm_display_mode *newmode = NULL;
> + unsigned int newflag = 0;
> +
> + if (((db[8 + offset + i] & 0x0f) > 7)
> + && (i + 1 == hdmi_3d_len - 4))
> + break;

The '(db[8 + offset + i] & 0x0f) > 7' part is repeated a few times.
Maybe add a 'bool detail_present = (db[8 + offset + i] & 0x0f) > 7' or
something to make make things a bit easier to read.

> +
> + /* 2D_VIC_order_X */
> + vic_index = db[8 + offset + i] >> 4;
> +
> + /* 3D_Structure_X */
> + switch (db[8 + offset + i] & 0x0f) {
> + case 0:
> + newflag = DRM_MODE_FLAG_3D_FRAME_PACKING;
> + break;
> + case 6:
> + newflag = DRM_MODE_FLAG_3D_TOP_AND_BOTTOM;
> + break;
> + case 8:

Maybe add a /* 3D_Detail_X */ comment here
for consistency with the other comments.

> + if ((db[9 + offset + i] >> 4) == 1)
> + newflag = DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF;
> + break;
> + }
> +
> + if (newflag != 0) {
> + newmode = drm_display_mode_from_vic_index(connector,
> +   video_db,
> +   video_len,
> +   vic_index);
> +
> + if (newmode) {
> + newmode->flags |= newflag;
> + drm_mode_probed_add(connector, newmode);
> + modes++;
> + }
> + }
> +
> + if ((db[8 + offset + i] & 0x0f) > 7) {
> + /* Optional 3D_Detail_X and reserved */
> + i++;
> + }
> + }
> +
>  out:
>   return modes;
>  }
> -- 
> 1.8.4.2
> 
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrj?l?
Intel OTC


[git pull] drm qxl leak fix

2013-11-28 Thread Dave Airlie

As usual 5 mins after I send a trivial pull fix I find a real bug!

This fixes a memory leak and I'd like to get it into stable queue asap.

Dave.

The following changes since commit eec99016e38b740662509f097effb90abc7a1376:

  drm/nouveau/hwmon: fix compilation without CONFIG_HWMON (2013-11-28 14:38:09 
+1000)

are available in the git repository at:

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

for you to fetch changes up to 1b28c3e628315ac0d9ef2d3fac0403f05ae692db:

  drm/qxl: fix memory leak in release list handling (2013-11-29 08:36:15 +1000)


Dave Airlie (1):
  drm/qxl: fix memory leak in release list handling

 drivers/gpu/drm/qxl/qxl_release.c | 1 +
 1 file changed, 1 insertion(+)


[PATCH v3 19/32] drm/exynos: Use mode_set to configure fimd

2013-11-28 Thread Tomasz Figa
On Friday 15 of November 2013 21:53:16 Daniel Kurtz wrote:
> Hi Sean, Tomasz,
> 
> On Mon, Nov 11, 2013 at 6:03 AM, Tomasz Figa  wrote:
> > Hi Sean,
> >
> > On Tuesday 29 of October 2013 12:13:05 Sean Paul wrote:
> >> This patch uses the mode passed into mode_set to configure fimd instead
> >> of directly using the panel from context. This will allow us to move
> >> the exynos_drm_display implementation from fimd into the DP driver
> >> where it belongs.
> >
> > Remember that DP is not the only possible way to connect a display driven
> > by FIMD. You also have the direct (RGB and i80) and DSI interfaces.
> >
> > Also, please see my comments inline.
> >
> >>
> >> Signed-off-by: Sean Paul 
> >> ---
> >>
> >> Changes in v2: None
> >> Changes in v3: None
> >>
> >>  drivers/gpu/drm/exynos/exynos_drm_fimd.c | 159 
> >> ++-
> >>  1 file changed, 91 insertions(+), 68 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
> >> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> >> index d2b8ccb..f69d6e5 100644
> >> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> >> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> >> @@ -104,6 +104,20 @@ struct fimd_win_data {
> >>   boolresume;
> >>  };
> >>
> >> +struct fimd_mode_data {
> >> + unsignedvtotal;
> >
> > For consistency with rest of the code, unsigned int would prefered.
> >
> > However, I'm not sure what is this struct for, since it does not store
> > neither raw register values (1 needs to be subtracted from them) nor
> > any values hard to compute at commit time (maybe except clkdiv, but still
> > how often commit would be called?).
> >
> >> + unsignedvdisplay;
> >> + unsignedvsync_len;
> >> + unsignedvbpd;
> >> + unsignedvfpd;
> >> + unsignedhtotal;
> >> + unsignedhdisplay;
> >> + unsignedhsync_len;
> >> + unsignedhbpd;
> >> + unsignedhfpd;
> >> + u32 clkdiv;
> >> +};
> >> +
> >>  struct fimd_context {
> >>   struct device   *dev;
> >>   struct drm_device   *drm_dev;
> >> @@ -112,8 +126,8 @@ struct fimd_context {
> >>   struct clk  *bus_clk;
> >>   struct clk  *lcd_clk;
> >>   void __iomem*regs;
> >> + struct fimd_mode_data   mode;
> >>   struct fimd_win_datawin_data[WINDOWS_NR];
> >> - unsigned intclkdiv;
> >>   unsigned intdefault_win;
> >>   unsigned long   irq_flags;
> >>   u32 vidcon0;
> >> @@ -560,11 +574,56 @@ static void fimd_dpms(struct exynos_drm_manager 
> >> *mgr, int mode)
> >>   mutex_unlock(&ctx->lock);
> >>  }
> >>
> >> +static u32 fimd_calc_clkdiv(struct fimd_context *ctx,
> >> + const struct drm_display_mode *mode)
> >> +{
> >> + unsigned long ideal_clk = mode->htotal * mode->vtotal * 
> >> mode->vrefresh;
> >> + u32 clkdiv;
> >> +
> >> + /* Find the clock divider value that gets us closest to ideal_clk */
> >> + clkdiv = DIV_ROUND_CLOSEST(clk_get_rate(ctx->lcd_clk), ideal_clk);
> >
> > This is a functional change unrelated to $subject. Before this patch,
> > DIV_ROUND_UP() had been used.
> >
> >> +
> >> + return (clkdiv < 0x100) ? clkdiv : 0xff;
> >> +}
> >> +
> >> +static bool fimd_mode_fixup(struct exynos_drm_manager *mgr,
> >> + const struct drm_display_mode *mode,
> >> + struct drm_display_mode *adjusted_mode)
> >> +{
> >> + if (adjusted_mode->vrefresh == 0)
> >> + adjusted_mode->vrefresh = FIMD_DEFAULT_FRAMERATE;
> 
> The actual pixel clock will be clk_get_rate(ctx->lcd_clk) / clkdiv.
> Should we also be adjusting the "clock" field of adjusted_mode here?

Not sure how the pixel clock in adjusted_mode is used elsewhere, but at
least for the sake of consistency, it might be good idea to adjust it
indeed.

Best regards,
Tomasz



i915: pipe state still does not match

2013-11-28 Thread Jan Engelhardt
On Wednesday 2013-11-27 12:08, Chris Wilson wrote:
>On Wed, Nov 27, 2013 at 11:59:56AM +0100, Jan Engelhardt wrote:
>> 
>> Despite the i915/drm fixes added in v3.11.8, the X server still 
>> terminates due to some pipe state bug in 3.11.9.
>
>X terminating is entirely unconnected with that *ERROR*.

Are you sure? Whenever X crashed, that inteldrv kernel message
was showing up in dmesg.
Affected versions:
xorg-x11-server-1.14.3.901
xf86-video-intel-2.99.906-4.1.x86_64
Working versions:
xorg-x11-server-1.13.2
xf86-video-intel-2.20.19

>Can you please attach your Xorg.0.log with the crash information?

What I could collect so far:


[47.331] 
This is a pre-release version of the X server from The X.Org Foundation.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the X.Org Foundation git repository.
See http://wiki.x.org/wiki/GitPage for git access instructions.
[47.331] 
X.Org X Server 1.14.3.901 (1.14.4 RC 1)
Release Date: 2013-10-26
[47.331] X Protocol Version 11, Revision 0
[47.331] Build Operating System: openSUSE SUSE LINUX
[47.331] Current Operating System: Linux nakamura.inai.de 
3.11.9-jng20-desktop #1 SMP PREEMPT Wed Nov 27 09:56:23 UTC 2013 (a089a7e) 
x86_64
[47.331] Kernel command line: root=/dev/disk/by-label/nakamura-root 
splash=silent showopts video=640x480
[47.332] Build Date: 06 November 2013  10:07:38AM
[47.332]  
[47.332] Current version of pixman: 0.30.2
[47.332]Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[47.332] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[47.333] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Nov 28 20:15:00 
2013
[47.335] (==) Using config directory: "/etc/X11/xorg.conf.d"
[47.335] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[47.378] (==) No Layout section.  Using the first Screen section.
[47.379] (==) No screen section available. Using defaults.
[47.379] (**) |-->Screen "Default Screen Section" (0)
[47.379] (**) |   |-->Monitor ""
[47.395] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[47.395] (==) Automatically adding devices
[47.395] (==) Automatically enabling devices
[47.395] (==) Automatically adding GPU devices
[47.396] (WW) The directory "/usr/share/fonts/misc/sgi" does not exist.
[47.396]Entry deleted from font path.
[47.396] (==) FontPath set to:
/usr/share/fonts/misc:unscaled,
/usr/share/fonts/Type1/,
/usr/share/fonts/100dpi:unscaled,
/usr/share/fonts/75dpi:unscaled,
/usr/share/fonts/ghostscript/,
/usr/share/fonts/cyrillic:unscaled,
/usr/share/fonts/truetype/,
built-ins
[47.396] (==) ModulePath set to 
"/usr/lib64/xorg/modules/updates,/usr/lib64/xorg/modules"
[47.396] (II) The server relies on udev to provide the list of input 
devices.
If no devices become available, reconfigure udev or disable 
AutoAddDevices.
[47.411] (II) Loader magic: 0x803c20
[47.411] (II) Module ABI versions:
[47.411]X.Org ANSI C Emulation: 0.4
[47.411]X.Org Video Driver: 14.1
[47.411]X.Org XInput driver : 19.1
[47.411]X.Org Server Extension : 7.0
[47.412] (II) xfree86: Adding drm device (/dev/dri/card0)
[47.416] (--) PCI:*(0:0:2:0) 8086:a011:104d:9075 rev 0, Mem @ 
0xfea8/524288, 0xe000/268435456, 0xfe80/1048576, I/O @ 0xf0f0/8
[47.417] (--) PCI: (0:0:2:1) 8086:a012:104d:9075 rev 0, Mem @ 
0xfea0/524288
[47.418] Initializing built-in extension Generic Event Extension
[47.419] Initializing built-in extension SHAPE
[47.419] Initializing built-in extension MIT-SHM
[47.419] Initializing built-in extension XInputExtension
[47.419] Initializing built-in extension XTEST
[47.419] Initializing built-in extension BIG-REQUESTS
[47.419] Initializing built-in extension SYNC
[47.419] Initializing built-in extension XKEYBOARD
[47.419] Initializing built-in extension XC-MISC
[47.419] Initializing built-in extension SECURITY
[47.419] Initializing built-in extension XINERAMA
[47.419] Initializing built-in extension XFIXES
[47.420] Initializing built-in extension RENDER
[47.420] Initializing built-in extension RANDR
[47.420] Initializing built-in extension COMPOSITE
[47.420] Initializing built-in extension DAMAGE
[47.420] Initializing built-in extension MIT-SCREEN-SAVER
[47.420] Initializing built-in extension DOUBLE-BUFFER
[47.420] Initializing built-i