[Bug 63702] tiling2d in radeon trash vdpau UVD textures
https://bugs.freedesktop.org/show_bug.cgi?id=63702 Christian König changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #9 from Christian König --- If you got other bugs then please open up a new bug report. -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: fix endian bugs in atom_allocate_fb_scratch()
On Mit, 2013-04-24 at 14:40 -0400, alexdeuc...@gmail.com wrote: > From: Alex Deucher > > Signed-off-by: Alex Deucher > Cc: sta...@vger.kernel.org > --- > drivers/gpu/drm/radeon/atom.c |6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c > index 46a9c37..fb441a7 100644 > --- a/drivers/gpu/drm/radeon/atom.c > +++ b/drivers/gpu/drm/radeon/atom.c > @@ -1394,10 +1394,10 @@ int atom_allocate_fb_scratch(struct atom_context *ctx) > firmware_usage = (struct _ATOM_VRAM_USAGE_BY_FIRMWARE > *)(ctx->bios + data_offset); > > DRM_DEBUG("atom firmware requested %08x %dkb\n", > - > firmware_usage->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware, > - > firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb); > + > le32_to_cpu(firmware_usage->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware), > + > le16_to_cpu(firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb)); > > - usage_bytes = > firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024; > + usage_bytes = > le16_to_cpu(firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb) * > 1024; > } Reviwed-by: Michel Dänzer -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Radeon RS690 and gcc 4.8.0
Good Day, Since switching to gcc 4.8.0 to compile the kernel (versions ranging from 3.6.11 through 3.9-rc8), I've been getting the following kernel oops at radeon/radeon_vram_location. This is on an HP 6715b laptop using an R300 RS690 chip. No issues with the newer radeon chipsets and no issues if gcc 4.7.2 is used. I wonder, gcc bug or gcc exposing a radeon bug? Neil [drm] Initialized drm 1.1.0 20060810 [drm] radeon kernel modesetting enabled. [drm] initializing kernel modesetting (RS690 0x1002:0x791F 0x103C:0x30C2). [drm] register mmio base: 0xD020 [drm] register mmio size: 65536 ATOM BIOS: ATI BUG: unable to handle kernel paging request at 8043 IP: [] radeon_vram_location+0x14/0x1f0 [radeon] *pdpt = 36205001 *pde = Oops: 0002 [#1] SMP Modules linked in: radeon(+) cfbfillrect cfbimgblt cfbcopyarea i2c_algo_bit drm_kms_helper ttm drm fbcon bitblit softcursor fb fbdev font ipv6 hid_generic usbhid hid fuse powernow_k8 joydev ohci_hcd ehci_pci ehci_hcd tg3 ptp pcmcia pps_core libphy fan processor ac button container battery video thermal thermal_sys yenta_socket pcmcia_rsrc shpchp pcmcia_core hp_wmi sparse_keymap snd_hda_codec_analog rfkill wmi snd_hda_intel snd_hda_codec snd_hwdep psmouse serio_raw evdev ati_agp agpgart snd_pcm i2c_dev i2c_piix4 i2c_core snd_page_alloc snd_timer snd soundcore k8temp hwmon Pid: 1681, comm: modprobe Not tainted 3.8.6-smp #1 Hewlett-Packard HP Compaq 6715b (GZ268US#ABA)/30C2 EIP: 0060:[] EFLAGS: 00010296 CPU: 0 EIP is at radeon_vram_location+0x14/0x1f0 [radeon] EAX: EBX: 7fff ECX: 7800 EDX: 7fff ESI: EDI: c000 EBP: f608bc8c ESP: f608bc3c DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 CR0: 8005003b CR2: 8043 CR3: 36298000 CR4: 07f0 DR0: DR1: DR2: DR3: DR6: 0ff0 DR7: 0400 Process modprobe (pid: 1681, ti=f608a000 task=f6a1ecb0 task.ti=f608a000) Stack: f63f1b40 5000 7fff f68a4000 c000 f608bc8c f8f0fa21 f608bc7c f68a4000 f608bc7e f608bc8c f8eda7b8 f608bc84 b54c0101 7fff f68a4000 c000 f608bcb8 f8f10981 7800 Call Trace: [] ? rs690_pm_info+0x31/0x400 [radeon] [] ? radeon_atombios_sideport_present+0x38/0xa0 [radeon] [] rs690_init+0x191/0x2f0 [radeon] [] radeon_device_init+0x602/0x6d0 [radeon] [] ? cail_mc_write+0x20/0x20 [radeon] [] radeon_driver_load_kms+0x7c/0x130 [radeon] [] drm_get_pci_dev+0x133/0x250 [drm] [] radeon_pci_probe+0xc1/0xf0 [radeon] [] pci_device_probe+0x57/0x90 [] really_probe+0x46/0x1c0 [] ? pci_match_device+0x96/0xa0 [] __driver_attach+0x77/0x80 [] ? __device_attach+0x40/0x40 [] bus_for_each_dev+0x47/0x80 [] driver_attach+0x19/0x20 [] ? __device_attach+0x40/0x40 [] bus_add_driver+0xa7/0x250 [] ? pci_dev_put+0x20/0x20 [] ? pci_dev_put+0x20/0x20 [] driver_register+0x65/0x130 [] __pci_register_driver+0x2d/0x30 [] drm_pci_init+0xf5/0x100 [drm] [] ? 0xf8f86fff [] radeon_init+0xd4/0xd6 [radeon] [] do_one_initcall+0x102/0x150 [] ? __vunmap+0x6e/0xd0 [] load_module+0x165d/0x1da0 [] sys_init_module+0x68/0x90 [] syscall_call+0x7/0xb Code: e8 d2 cb 34 c8 89 f8 e9 e2 fe ff ff 8d 74 26 00 8d bc 27 00 00 00 00 55 89 e5 57 56 53 83 ec 44 8b 75 0c 89 45 d8 a1 38 52 f7 f8 <89> 72 44 89 c3 89 c1 c1 fb 1f 0f a4 c3 14 8b 42 18 89 5d e8 8b EIP: [] radeon_vram_location+0x14/0x1f0 [radeon] SS:ESP 0068:f608bc3c CR2: 8043 ---[ end trace 7a5a89da8e33c170 ]--- ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCHv4 1/2] ppc64: perform proper max_bus_speed detection
On Wed, Apr 24, 2013 at 07:54:49PM -0300, luca...@linux.vnet.ibm.com wrote: > From: Lucas Kannebley Tavares > > On pseries machines the detection for max_bus_speed should be done > through an OpenFirmware property. This patch adds a function to perform > this detection and a hook to perform dynamic adding of the function only for > pseries. This is done by overwriting the weak > pcibios_root_bridge_prepare function which is called by pci_create_root_bus(). > > Signed-off-by: Lucas Kannebley Tavares > --- > arch/powerpc/include/asm/machdep.h | 2 ++ > arch/powerpc/kernel/pci-common.c | 8 + > arch/powerpc/platforms/pseries/pci.c | 51 > > arch/powerpc/platforms/pseries/pseries.h | 4 +++ > arch/powerpc/platforms/pseries/setup.c | 2 ++ > 5 files changed, 67 insertions(+) > > diff --git a/arch/powerpc/include/asm/machdep.h > b/arch/powerpc/include/asm/machdep.h > index 3d6b410..8f558bf 100644 > --- a/arch/powerpc/include/asm/machdep.h > +++ b/arch/powerpc/include/asm/machdep.h > @@ -107,6 +107,8 @@ struct machdep_calls { > void(*pcibios_fixup)(void); > int (*pci_probe_mode)(struct pci_bus *); > void(*pci_irq_fixup)(struct pci_dev *dev); > + int (*pcibios_root_bridge_prepare)(struct pci_host_bridge > + *bridge); > > /* To setup PHBs when using automatic OF platform driver for PCI */ > int (*pci_setup_phb)(struct pci_controller *host); > diff --git a/arch/powerpc/kernel/pci-common.c > b/arch/powerpc/kernel/pci-common.c > index fa12ae4..80986cf 100644 > --- a/arch/powerpc/kernel/pci-common.c > +++ b/arch/powerpc/kernel/pci-common.c > @@ -844,6 +844,14 @@ int pci_proc_domain(struct pci_bus *bus) > return 1; > } > > +int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) > +{ > + if (ppc_md.pcibios_root_bridge_prepare) > + return ppc_md.pcibios_root_bridge_prepare(bridge); > + > + return 0; > +} > + > /* This header fixup will do the resource fixup for all devices as they are > * probed, but not for bridge ranges > */ > diff --git a/arch/powerpc/platforms/pseries/pci.c > b/arch/powerpc/platforms/pseries/pci.c > index 0b580f4..7f9c956 100644 > --- a/arch/powerpc/platforms/pseries/pci.c > +++ b/arch/powerpc/platforms/pseries/pci.c > @@ -108,3 +108,54 @@ static void fixup_winbond_82c105(struct pci_dev* dev) > } > DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, >fixup_winbond_82c105); > + > +int pseries_root_bridge_prepare(struct pci_host_bridge *bridge) > +{ > + struct device_node *dn, *pdn; > + struct pci_bus *bus; > + const uint32_t *pcie_link_speed_stats; > + > + bus = bridge->bus; > + > + dn = pcibios_get_phb_of_node(bus); > + if (!dn) > + return 0; > + > + for (pdn = dn; pdn != NULL; pdn = pdn->parent) { > + pcie_link_speed_stats = (const uint32_t *) of_get_property(dn, > + "ibm,pcie-link-speed-stats", NULL); > + if (pcie_link_speed_stats) > + break; > + } Please use the helpers in include/linux/of.h rather than open coding this. Yours Tony pgpr6WGSBkf7v.pgp Description: PGP signature ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 62466] r600g hyperz lockups with KSP 0.19
https://bugs.freedesktop.org/show_bug.cgi?id=62466 --- Comment #7 from Knut Andre Tidemann --- That patch fixes the bug! I can reliably reproduce it in a few seconds without the patch, but I have not been able to get a GPU hang after I applied the patch! I've only done minimal teseting, 5-10 min, but everything works great. -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/shmobile: Fix race condition between page flip request and handler
On Thursday 28 March 2013 16:10:02 Laurent Pinchart wrote: > Hi Dave, > > Could you please pick this patch for v3.10 ? Ping ? > On Tuesday 12 March 2013 15:38:43 Laurent Pinchart wrote: > > The page flip handler stores the page flip event pointer and then calls > > drm_vblank_get() to enable the vblank interrupt. Due to the vblank off > > delay, the vblank interrupt can be enabled in the hardware at that > > point, even if the vblank reference count is equal to 0. If a vblank > > interrupt is triggered between storing the event pointer and calling > > drm_vblank_get(), the page flip completion handler will process the > > event and call drm_vblank_put() with a reference count equal to 0. This > > will result in a BUG_ON. > > > > Fix the race condition by calling drm_vblank_get() before storing the > > event pointer. > > > > Signed-off-by: Laurent Pinchart > > > > --- > > > > drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index d917a41..7dff49e 100644 > > --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > @@ -494,10 +494,10 @@ static int shmob_drm_crtc_page_flip(struct drm_crtc > > *crtc, > > > > if (event) { > > > > event->pipe = 0; > > > > + drm_vblank_get(dev, 0); > > > > spin_lock_irqsave(&dev->event_lock, flags); > > scrtc->event = event; > > spin_unlock_irqrestore(&dev->event_lock, flags); > > > > - drm_vblank_get(dev, 0); > > > > } > > > > return 0; -- Regards, Laurent Pinchart ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 63865] radeon_atombios_get_power_modes oops with E-350
https://bugs.freedesktop.org/show_bug.cgi?id=63865 --- Comment #3 from Alex Deucher --- (In reply to comment #2) > linux 3.7.9 works fine, I'll try to obtain earlier 3.8.x packages to test. Any chance you could bisect? -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 63865] radeon_atombios_get_power_modes oops with E-350
https://bugs.freedesktop.org/show_bug.cgi?id=63865 --- Comment #4 from Alex Deucher --- Created attachment 78471 --> https://bugs.freedesktop.org/attachment.cgi?id=78471&action=edit Possible fix The attached patch should fix it, but I don't see how any kernel ever would have worked with your card. Did you change any bios settings or flash your bios recently? -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 62959] r600g (HD 6950 Cayman) fails piglit tests and hangs system
https://bugs.freedesktop.org/show_bug.cgi?id=62959 --- Comment #60 from udo --- The first bisect kernel I try gives me youtube videos that are blocks of gibberish. What to do about that? 3.7.1. crashed like previous kernels (showing text boot screen) but no messages in the log. So is that the same problem we're seeing and searching for? -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/radeon: allocate SA bo in the requested domain
From: Christian König This avoid moving the BO directly after allocating it. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_sa.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c index cb80099..0abe5a9 100644 --- a/drivers/gpu/drm/radeon/radeon_sa.c +++ b/drivers/gpu/drm/radeon/radeon_sa.c @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device *rdev, } r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true, -RADEON_GEM_DOMAIN_CPU, NULL, &sa_manager->bo); +domain, NULL, &sa_manager->bo); if (r) { dev_err(rdev->dev, "(%d) failed to allocate bo for manager\n", r); return r; -- 1.7.10.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: allocate SA bo in the requested domain
On Thu, Apr 25, 2013 at 12:19 PM, Christian König wrote: > From: Christian König > > This avoid moving the BO directly after allocating it. > > Signed-off-by: Christian König Looks good. Applied to my tree. Alex > --- > drivers/gpu/drm/radeon/radeon_sa.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_sa.c > b/drivers/gpu/drm/radeon/radeon_sa.c > index cb80099..0abe5a9 100644 > --- a/drivers/gpu/drm/radeon/radeon_sa.c > +++ b/drivers/gpu/drm/radeon/radeon_sa.c > @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device *rdev, > } > > r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true, > -RADEON_GEM_DOMAIN_CPU, NULL, &sa_manager->bo); > +domain, NULL, &sa_manager->bo); > if (r) { > dev_err(rdev->dev, "(%d) failed to allocate bo for > manager\n", r); > return r; > -- > 1.7.10.4 > ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: allocate SA bo in the requested domain
Am 25.04.2013 18:40, schrieb Alex Deucher: On Thu, Apr 25, 2013 at 12:19 PM, Christian König wrote: From: Christian König This avoid moving the BO directly after allocating it. Signed-off-by: Christian König Looks good. Applied to my tree. Have you also seen/applied "[PATCH] drm/radeon: fix scratch reg handling for UVD fence"? That one is more important cause it fixes a real bug, while this patch is just a cleanup. Christian. Alex --- drivers/gpu/drm/radeon/radeon_sa.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c index cb80099..0abe5a9 100644 --- a/drivers/gpu/drm/radeon/radeon_sa.c +++ b/drivers/gpu/drm/radeon/radeon_sa.c @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device *rdev, } r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true, -RADEON_GEM_DOMAIN_CPU, NULL, &sa_manager->bo); +domain, NULL, &sa_manager->bo); if (r) { dev_err(rdev->dev, "(%d) failed to allocate bo for manager\n", r); return r; -- 1.7.10.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] drm/radeon: allocate SA bo in the requested domain
On Thu, Apr 25, 2013 at 12:47 PM, Christian König wrote: > Am 25.04.2013 18:40, schrieb Alex Deucher: > >> On Thu, Apr 25, 2013 at 12:19 PM, Christian König >> wrote: >>> >>> From: Christian König >>> >>> This avoid moving the BO directly after allocating it. >>> >>> Signed-off-by: Christian König >> >> Looks good. Applied to my tree. > > > Have you also seen/applied "[PATCH] drm/radeon: fix scratch reg handling for > UVD fence"? > > That one is more important cause it fixes a real bug, while this patch is > just a cleanup. I'll grab that one too. Alex > > Christian. > > >> Alex >> >>> --- >>> drivers/gpu/drm/radeon/radeon_sa.c |2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/gpu/drm/radeon/radeon_sa.c >>> b/drivers/gpu/drm/radeon/radeon_sa.c >>> index cb80099..0abe5a9 100644 >>> --- a/drivers/gpu/drm/radeon/radeon_sa.c >>> +++ b/drivers/gpu/drm/radeon/radeon_sa.c >>> @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device >>> *rdev, >>> } >>> >>> r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true, >>> -RADEON_GEM_DOMAIN_CPU, NULL, >>> &sa_manager->bo); >>> +domain, NULL, &sa_manager->bo); >>> if (r) { >>> dev_err(rdev->dev, "(%d) failed to allocate bo for >>> manager\n", r); >>> return r; >>> -- >>> 1.7.10.4 >>> > ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 1/3] drm: Make drm_ioctls const
From: Ville Syrjälä We never modify the contents of drm_ioctls, so make it const. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 0ac1991..80c6895 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -60,7 +60,7 @@ static int drm_version(struct drm_device *dev, void *data, [DRM_IOCTL_NR(ioctl)] = {.cmd = ioctl, .func = _func, .flags = _flags, .cmd_drv = 0} /** Ioctl table */ -static struct drm_ioctl_desc drm_ioctls[] = { +static const struct drm_ioctl_desc drm_ioctls[] = { DRM_IOCTL_DEF(DRM_IOCTL_VERSION, drm_version, DRM_UNLOCKED), DRM_IOCTL_DEF(DRM_IOCTL_GET_UNIQUE, drm_getunique, 0), DRM_IOCTL_DEF(DRM_IOCTL_GET_MAGIC, drm_getmagic, 0), @@ -375,7 +375,7 @@ long drm_ioctl(struct file *filp, { struct drm_file *file_priv = filp->private_data; struct drm_device *dev; - struct drm_ioctl_desc *ioctl; + const struct drm_ioctl_desc *ioctl; drm_ioctl_t *func; unsigned int nr = DRM_IOCTL_NR(cmd); int retcode = -EINVAL; -- 1.8.1.5 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 3/3] drm: Kill user_modes list and the associated ioctls
From: Ville Syrjälä There is no way to use modes added to the user_modes list. We never look at the contents of said list in the kernel, and the only operations userspace can do are attach and detach. So the only "benefit" of this interface is wasting kernel memory. Fortunately it seems no real user space application ever used these ioctls. So just kill them. Also remove the prototypes for the non-existing drm_mode_addmode_ioctl() and drm_mode_rmmode_ioctl() functions. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/drm_crtc.c | 190 - drivers/gpu/drm/drm_drv.c | 2 - include/drm/drm_crtc.h | 15 include/uapi/drm/drm.h | 4 +- 4 files changed, 2 insertions(+), 209 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 287cd82..3a8f7e6d 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -703,7 +703,6 @@ int drm_connector_init(struct drm_device *dev, connector->connector_type = connector_type; connector->connector_type_id = ++drm_connector_enum_list[connector_type].count; /* TODO */ - INIT_LIST_HEAD(&connector->user_modes); INIT_LIST_HEAD(&connector->probed_modes); INIT_LIST_HEAD(&connector->modes); connector->edid_blob_ptr = NULL; @@ -744,9 +743,6 @@ void drm_connector_cleanup(struct drm_connector *connector) list_for_each_entry_safe(mode, t, &connector->modes, head) drm_mode_remove(connector, mode); - list_for_each_entry_safe(mode, t, &connector->user_modes, head) - drm_mode_remove(connector, mode); - drm_mode_object_put(dev, &connector->base); list_del(&connector->head); dev->mode_config.num_connector--; @@ -2613,192 +2609,6 @@ void drm_fb_release(struct drm_file *priv) mutex_unlock(&priv->fbs_lock); } -/** - * drm_mode_attachmode - add a mode to the user mode list - * @dev: DRM device - * @connector: connector to add the mode to - * @mode: mode to add - * - * Add @mode to @connector's user mode list. - */ -static void drm_mode_attachmode(struct drm_device *dev, - struct drm_connector *connector, - struct drm_display_mode *mode) -{ - list_add_tail(&mode->head, &connector->user_modes); -} - -int drm_mode_attachmode_crtc(struct drm_device *dev, struct drm_crtc *crtc, -const struct drm_display_mode *mode) -{ - struct drm_connector *connector; - int ret = 0; - struct drm_display_mode *dup_mode, *next; - LIST_HEAD(list); - - list_for_each_entry(connector, &dev->mode_config.connector_list, head) { - if (!connector->encoder) - continue; - if (connector->encoder->crtc == crtc) { - dup_mode = drm_mode_duplicate(dev, mode); - if (!dup_mode) { - ret = -ENOMEM; - goto out; - } - list_add_tail(&dup_mode->head, &list); - } - } - - list_for_each_entry(connector, &dev->mode_config.connector_list, head) { - if (!connector->encoder) - continue; - if (connector->encoder->crtc == crtc) - list_move_tail(list.next, &connector->user_modes); - } - - WARN_ON(!list_empty(&list)); - - out: - list_for_each_entry_safe(dup_mode, next, &list, head) - drm_mode_destroy(dev, dup_mode); - - return ret; -} -EXPORT_SYMBOL(drm_mode_attachmode_crtc); - -static int drm_mode_detachmode(struct drm_device *dev, - struct drm_connector *connector, - struct drm_display_mode *mode) -{ - int found = 0; - int ret = 0; - struct drm_display_mode *match_mode, *t; - - list_for_each_entry_safe(match_mode, t, &connector->user_modes, head) { - if (drm_mode_equal(match_mode, mode)) { - list_del(&match_mode->head); - drm_mode_destroy(dev, match_mode); - found = 1; - break; - } - } - - if (!found) - ret = -EINVAL; - - return ret; -} - -int drm_mode_detachmode_crtc(struct drm_device *dev, struct drm_display_mode *mode) -{ - struct drm_connector *connector; - - list_for_each_entry(connector, &dev->mode_config.connector_list, head) { - drm_mode_detachmode(dev, connector, mode); - } - return 0; -} -EXPORT_SYMBOL(drm_mode_detachmode_crtc); - -/** - * drm_fb_attachmode - Attach a user mode to an connector - * @dev: drm device for the ioctl - * @data: data pointer for the ioctl - * @file_priv: drm file for the ioctl call - * - * This attaches a user specified mode to an connector. - * Call
[PATCH 2/3] drm: Silence some sparse warnings
From: Ville Syrjälä drivers/gpu/drm/drm_pci.c:155:5: warning: symbol 'drm_pci_set_busid' was not declared. Should it be static? drivers/gpu/drm/drm_pci.c:197:5: warning: symbol 'drm_pci_set_unique' was not declared. Should it be static? drivers/gpu/drm/drm_pci.c:269:5: warning: symbol 'drm_pci_agp_init' was not declared. Should it be static? drivers/gpu/drm/drm_crtc.c:181:1: warning: symbol 'drm_get_dirty_info_name' was not declared. Should it be static? drivers/gpu/drm/drm_crtc.c:1123:5: warning: symbol 'drm_mode_group_init' was not declared. Should it be static? drivers/gpu/drm/drm_modes.c:918:6: warning: symbol 'drm_mode_validate_clocks' was not declared. Should it be static? Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/drm_crtc.c | 5 + drivers/gpu/drm/drm_pci.c | 10 +- include/drm/drm_crtc.h | 3 +++ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index c577bae..287cd82 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -178,9 +178,6 @@ static struct drm_prop_enum_list drm_dirty_info_enum_list[] = { { DRM_MODE_DIRTY_ANNOTATE, "Annotate" }, }; -DRM_ENUM_NAME_FN(drm_get_dirty_info_name, -drm_dirty_info_enum_list) - struct drm_conn_prop_enum_list { int type; char *name; @@ -1120,7 +1117,7 @@ int drm_mode_create_dirty_info_property(struct drm_device *dev) } EXPORT_SYMBOL(drm_mode_create_dirty_info_property); -int drm_mode_group_init(struct drm_device *dev, struct drm_mode_group *group) +static int drm_mode_group_init(struct drm_device *dev, struct drm_mode_group *group) { uint32_t total_objects = 0; diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index bd719e9..14194b6 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c @@ -152,7 +152,7 @@ static const char *drm_pci_get_name(struct drm_device *dev) return pdriver->name; } -int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master) +static int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master) { int len, ret; struct pci_driver *pdriver = dev->driver->kdriver.pci; @@ -194,9 +194,9 @@ err: return ret; } -int drm_pci_set_unique(struct drm_device *dev, - struct drm_master *master, - struct drm_unique *u) +static int drm_pci_set_unique(struct drm_device *dev, + struct drm_master *master, + struct drm_unique *u) { int domain, bus, slot, func, ret; const char *bus_name; @@ -266,7 +266,7 @@ static int drm_pci_irq_by_busid(struct drm_device *dev, struct drm_irq_busid *p) return 0; } -int drm_pci_agp_init(struct drm_device *dev) +static int drm_pci_agp_init(struct drm_device *dev) { if (drm_core_has_AGP(dev)) { if (drm_pci_device_is_agp(dev)) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 8c7846b..619ea86 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -938,6 +938,9 @@ extern void drm_mode_list_concat(struct list_head *head, extern void drm_mode_validate_size(struct drm_device *dev, struct list_head *mode_list, int maxX, int maxY, int maxPitch); +extern void drm_mode_validate_clocks(struct drm_device *dev, +struct list_head *mode_list, +int *min, int *max, int n_ranges); extern void drm_mode_prune_invalid(struct drm_device *dev, struct list_head *mode_list, bool verbose); extern void drm_mode_sort(struct list_head *mode_list); -- 1.8.1.5 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH libdrm] Deprecate drmModeAttachMode and drmModeDetachMode
From: Ville Syrjälä The kernel no longer implements the ioctls, and they never did anything useful. Signed-off-by: Ville Syrjälä --- xf86drmMode.c | 16 xf86drmMode.h | 10 ++ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/xf86drmMode.c b/xf86drmMode.c index f603ceb..74e074d 100644 --- a/xf86drmMode.c +++ b/xf86drmMode.c @@ -539,24 +539,16 @@ err_allocs: return r; } +/* deprecated */ int drmModeAttachMode(int fd, uint32_t connector_id, drmModeModeInfoPtr mode_info) { - struct drm_mode_mode_cmd res; - - memcpy(&res.mode, mode_info, sizeof(struct drm_mode_modeinfo)); - res.connector_id = connector_id; - - return DRM_IOCTL(fd, DRM_IOCTL_MODE_ATTACHMODE, &res); + return -EINVAL; } +/* deprecated */ int drmModeDetachMode(int fd, uint32_t connector_id, drmModeModeInfoPtr mode_info) { - struct drm_mode_mode_cmd res; - - memcpy(&res.mode, mode_info, sizeof(struct drm_mode_modeinfo)); - res.connector_id = connector_id; - - return DRM_IOCTL(fd, DRM_IOCTL_MODE_DETACHMODE, &res); + return -EINVAL; } diff --git a/xf86drmMode.h b/xf86drmMode.h index 8e40034..0f0c26b 100644 --- a/xf86drmMode.h +++ b/xf86drmMode.h @@ -398,15 +398,9 @@ drmModeEncoderPtr drmModeGetEncoder(int fd, uint32_t encoder_id); extern drmModeConnectorPtr drmModeGetConnector(int fd, uint32_t connectorId); -/** - * Attaches the given mode to an connector. - */ +/* deprecated */ extern int drmModeAttachMode(int fd, uint32_t connectorId, drmModeModeInfoPtr mode_info); - -/** - * Detaches a mode from the connector - * must be unused, by the given mode. - */ +/* deprecated */ extern int drmModeDetachMode(int fd, uint32_t connectorId, drmModeModeInfoPtr mode_info); extern drmModePropertyPtr drmModeGetProperty(int fd, uint32_t propertyId); -- 1.8.1.5 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 08/21] drm/nouveau: use mdelay instead of large udelay constants
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those. Signed-off-by: Arnd Bergmann Cc: David Airlie Cc: Ben Skeggs Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c index d0817d9..ed7415e 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c @@ -51,7 +51,8 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 loadval) const u32 doff = (or * 0x800); int load = -EINVAL; nv_wr32(priv, 0x61a00c + doff, 0x0010 | loadval); - udelay(9500); + mdelay(9); + udelay(500); nv_wr32(priv, 0x61a00c + doff, 0x8000); load = (nv_rd32(priv, 0x61a00c + doff) & 0x3800) >> 27; nv_wr32(priv, 0x61a00c + doff, 0x); -- 1.8.1.2 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 09/21] drm: export drm_vm_open_locked
The EXYNOS DRM driver uses drm_vm_open_locked in its mmap() function, and it can be built as a loadable module, which currently fails. This exports the symbol from the DRM core to avoid ERROR: "drm_vm_open_locked" [drivers/gpu/drm/exynos/exynosdrm.ko] undefined! Signed-off-by: Arnd Bergmann Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park --- drivers/gpu/drm/drm_vm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index db7bd29..1d4f7c9 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -422,6 +422,7 @@ void drm_vm_open_locked(struct drm_device *dev, list_add(&vma_entry->head, &dev->vmalist); } } +EXPORT_SYMBOL_GPL(drm_vm_open_locked); static void drm_vm_open(struct vm_area_struct *vma) { -- 1.8.1.2 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 00/21] more arm build fixes
Hi subsystem maintainers, Here is another set of patches that resulted from build testing on linux-next. Please apply directly into your trees if you agree, or let me know if I made a mistake. I can take whatever remains through the arm-soc tree if you prefer that or I don't hear back. Arnd Arnd Bergmann (21): ARM: topology: export cpu_topology ARM: default machine descriptor for multiplatform ARM: shmobile: don't call irqchip_init unconditionally ARM: orion5x: include linux/cpu.h atm: he: use mdelay instead of large udelay constants ALSA: ali5451: use mdelay instead of large udelay constants oss/dmabuf: use dma_map_single drm/nouveau: use mdelay instead of large udelay constants drm: export drm_vm_open_locked [SCSI] nsp32: use mdelay instead of large udelay constants irqdomain: export irq_domain_add_simple irqchip: s3c24xx: add missing __init annotations iommu: tegra: print dma_addr_t using %lld cpufreq: pxa2xx: initialize variables thermal: cooling: avoid uninitialied used gcc warning OF: remove #ifdef from linux/of_platform.h X.509: do not emit any informational output USB: ehci-msm: USB_MSM_OTG needs USB_PHY USB: lpc32xx: ISP1301 needs USB_PHY USB: OMAP: ISP1301 needs USB_PHY USB: OHCI: avoid conflicting platform drivers arch/arm/Kconfig | 1 - arch/arm/configs/lpc32xx_defconfig | 1 + arch/arm/configs/msm_defconfig | 1 + arch/arm/configs/omap1_defconfig | 1 + arch/arm/kernel/devtree.c | 7 ++ arch/arm/kernel/setup.c| 11 +- arch/arm/kernel/topology.c | 1 + arch/arm/mach-orion5x/common.c | 1 + arch/arm/mach-shmobile/intc-r8a7740.c | 13 +- drivers/atm/he.c | 2 +- drivers/cpufreq/pxa2xx-cpufreq.c | 5 +- drivers/gpu/drm/drm_vm.c | 1 + drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 3 +- drivers/iommu/tegra-gart.c | 3 +- drivers/iommu/tegra-smmu.c | 2 +- drivers/irqchip/irq-s3c24xx.c | 4 +- drivers/scsi/nsp32.c | 2 +- drivers/thermal/cpu_cooling.c | 17 +-- drivers/usb/gadget/Kconfig | 2 + drivers/usb/host/Kconfig | 1 + drivers/usb/host/ohci-hcd.c| 136 ++--- drivers/usb/phy/Makefile | 2 +- include/linux/of_platform.h| 13 +- kernel/irq/irqdomain.c | 1 + lib/build_OID_registry | 2 - sound/oss/dmabuf.c | 3 +- sound/pci/ali5451/ali5451.c| 8 +- 27 files changed, 187 insertions(+), 57 deletions(-) -- 1.8.1.2 Cc: "James E.J. Bottomley" Cc: Benjamin Herrenschmidt Cc: David Airlie Cc: Felipe Balbi Cc: Grant Likely Cc: Greg Kroah-Hartman Cc: Inki Dae Cc: Jason Cooper Cc: Joerg Roedel Cc: Nicolas Pitre Cc: Rafael J. Wysocki Cc: Rob Herring Cc: Russell King Cc: Simon Horman Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Will Deacon Cc: alsa-de...@alsa-project.org Cc: dri-devel@lists.freedesktop.org Cc: linux-atm-gene...@lists.sourceforge.net Cc: linux-s...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: net...@vger.kernel.org ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCHv4 1/2] ppc64: perform proper max_bus_speed detection
On 04/24/2013 08:48 PM, Tony Breeds wrote: On Wed, Apr 24, 2013 at 07:54:49PM -0300, luca...@linux.vnet.ibm.com wrote: From: Lucas Kannebley Tavares On pseries machines the detection for max_bus_speed should be done through an OpenFirmware property. This patch adds a function to perform this detection and a hook to perform dynamic adding of the function only for pseries. This is done by overwriting the weak pcibios_root_bridge_prepare function which is called by pci_create_root_bus(). Signed-off-by: Lucas Kannebley Tavares --- arch/powerpc/include/asm/machdep.h | 2 ++ arch/powerpc/kernel/pci-common.c | 8 + arch/powerpc/platforms/pseries/pci.c | 51 arch/powerpc/platforms/pseries/pseries.h | 4 +++ arch/powerpc/platforms/pseries/setup.c | 2 ++ 5 files changed, 67 insertions(+) diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index 3d6b410..8f558bf 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h @@ -107,6 +107,8 @@ struct machdep_calls { void(*pcibios_fixup)(void); int (*pci_probe_mode)(struct pci_bus *); void(*pci_irq_fixup)(struct pci_dev *dev); + int (*pcibios_root_bridge_prepare)(struct pci_host_bridge + *bridge); /* To setup PHBs when using automatic OF platform driver for PCI */ int (*pci_setup_phb)(struct pci_controller *host); diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index fa12ae4..80986cf 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c @@ -844,6 +844,14 @@ int pci_proc_domain(struct pci_bus *bus) return 1; } +int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) +{ + if (ppc_md.pcibios_root_bridge_prepare) + return ppc_md.pcibios_root_bridge_prepare(bridge); + + return 0; +} + /* This header fixup will do the resource fixup for all devices as they are * probed, but not for bridge ranges */ diff --git a/arch/powerpc/platforms/pseries/pci.c b/arch/powerpc/platforms/pseries/pci.c index 0b580f4..7f9c956 100644 --- a/arch/powerpc/platforms/pseries/pci.c +++ b/arch/powerpc/platforms/pseries/pci.c @@ -108,3 +108,54 @@ static void fixup_winbond_82c105(struct pci_dev* dev) } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, fixup_winbond_82c105); + +int pseries_root_bridge_prepare(struct pci_host_bridge *bridge) +{ + struct device_node *dn, *pdn; + struct pci_bus *bus; + const uint32_t *pcie_link_speed_stats; + + bus = bridge->bus; + + dn = pcibios_get_phb_of_node(bus); + if (!dn) + return 0; + + for (pdn = dn; pdn != NULL; pdn = pdn->parent) { + pcie_link_speed_stats = (const uint32_t *) of_get_property(dn, + "ibm,pcie-link-speed-stats", NULL); + if (pcie_link_speed_stats) + break; + } Please use the helpers in include/linux/of.h rather than open coding this. Yours Tony Hi Tony, This is what I can find as an equivalent code: for (pdn = dn; pdn != NULL; pdn = of_get_next_parent(pdn)) { pcie_link_speed_stats = (const uint32_t *) of_get_property(dn, "ibm,pcie-link-speed-stats", NULL); if (pcie_link_speed_stats) break; } is this your suggestion, or was it another approach that will have the same result? Thanks, -- Lucas Kannebley Tavares Software Engineer IBM Linux Technology Center ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 11/21] drm/tilcdc: use only a single module device table
On Tue, Apr 23, 2013 at 12:30 PM, Arnd Bergmann wrote: > The tilcdc driver fails to be built as a module because of extraneous > MODULE_DEVICE_TABLE entries: > > drivers/gpu/drm/tilcdc/tilcdc_slave.o:(.data+0x54): multiple definition of > `__mod_of_device_table' > drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here > drivers/gpu/drm/tilcdc/tilcdc_panel.o:(.data+0x54): multiple definition of > `__mod_of_device_table' > drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here > drivers/gpu/drm/tilcdc/tilcdc_drv.o:(.data+0x184): multiple definition of > `__mod_of_device_table' > drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here > > Since the entire point of these entries is to make the module autoload > when one of the devices is present, it's enough to keep the one entry > for "ti,am33xx-tilcdc", which should always be there if any of the > others are. Thanks Arnd Acked-By: Rob Clark > Cc: Rob Clark > Cc: Dave Airlie > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Arnd Bergmann > --- > drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - > drivers/gpu/drm/tilcdc/tilcdc_slave.c | 1 - > drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 - > 3 files changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c > b/drivers/gpu/drm/tilcdc/tilcdc_panel.c > index 580b74e..eb99f42 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c > @@ -413,7 +413,6 @@ static struct of_device_id panel_of_match[] = { > { .compatible = "ti,tilcdc,panel", }, > { }, > }; > -MODULE_DEVICE_TABLE(of, panel_of_match); > > struct platform_driver panel_driver = { > .probe = panel_probe, > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave.c > b/drivers/gpu/drm/tilcdc/tilcdc_slave.c > index 568dc1c..db1d2fc 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_slave.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_slave.c > @@ -353,7 +353,6 @@ static struct of_device_id slave_of_match[] = { > { .compatible = "ti,tilcdc,slave", }, > { }, > }; > -MODULE_DEVICE_TABLE(of, slave_of_match); > > struct platform_driver slave_driver = { > .probe = slave_probe, > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c > b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c > index 58d487b..a36788f 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c > @@ -396,7 +396,6 @@ static struct of_device_id tfp410_of_match[] = { > { .compatible = "ti,tilcdc,tfp410", }, > { }, > }; > -MODULE_DEVICE_TABLE(of, tfp410_of_match); > > struct platform_driver tfp410_driver = { > .probe = tfp410_probe, > -- > 1.8.1.2 > ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/3] drm: Kill user_modes list and the associated ioctls
On Thu, Apr 25, 2013 at 7:09 PM, wrote: > From: Ville Syrjälä > > There is no way to use modes added to the user_modes list. We never > look at the contents of said list in the kernel, and the only operations > userspace can do are attach and detach. So the only "benefit" of this > interface is wasting kernel memory. > > Fortunately it seems no real user space application ever used these > ioctls. So just kill them. > > Also remove the prototypes for the non-existing drm_mode_addmode_ioctl() > and drm_mode_rmmode_ioctl() functions. > > Signed-off-by: Ville Syrjälä I've added the drm_nop ioctl function for such cases, that way even when userspace uses this we'll keep on lying instead of potentially upsetting something with an failed ioctl call. Also helps to document the holes in the ioctl table. -Daniel > --- > drivers/gpu/drm/drm_crtc.c | 190 > - > drivers/gpu/drm/drm_drv.c | 2 - > include/drm/drm_crtc.h | 15 > include/uapi/drm/drm.h | 4 +- > 4 files changed, 2 insertions(+), 209 deletions(-) > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index 287cd82..3a8f7e6d 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -703,7 +703,6 @@ int drm_connector_init(struct drm_device *dev, > connector->connector_type = connector_type; > connector->connector_type_id = > ++drm_connector_enum_list[connector_type].count; /* TODO */ > - INIT_LIST_HEAD(&connector->user_modes); > INIT_LIST_HEAD(&connector->probed_modes); > INIT_LIST_HEAD(&connector->modes); > connector->edid_blob_ptr = NULL; > @@ -744,9 +743,6 @@ void drm_connector_cleanup(struct drm_connector > *connector) > list_for_each_entry_safe(mode, t, &connector->modes, head) > drm_mode_remove(connector, mode); > > - list_for_each_entry_safe(mode, t, &connector->user_modes, head) > - drm_mode_remove(connector, mode); > - > drm_mode_object_put(dev, &connector->base); > list_del(&connector->head); > dev->mode_config.num_connector--; > @@ -2613,192 +2609,6 @@ void drm_fb_release(struct drm_file *priv) > mutex_unlock(&priv->fbs_lock); > } > > -/** > - * drm_mode_attachmode - add a mode to the user mode list > - * @dev: DRM device > - * @connector: connector to add the mode to > - * @mode: mode to add > - * > - * Add @mode to @connector's user mode list. > - */ > -static void drm_mode_attachmode(struct drm_device *dev, > - struct drm_connector *connector, > - struct drm_display_mode *mode) > -{ > - list_add_tail(&mode->head, &connector->user_modes); > -} > - > -int drm_mode_attachmode_crtc(struct drm_device *dev, struct drm_crtc *crtc, > -const struct drm_display_mode *mode) > -{ > - struct drm_connector *connector; > - int ret = 0; > - struct drm_display_mode *dup_mode, *next; > - LIST_HEAD(list); > - > - list_for_each_entry(connector, &dev->mode_config.connector_list, > head) { > - if (!connector->encoder) > - continue; > - if (connector->encoder->crtc == crtc) { > - dup_mode = drm_mode_duplicate(dev, mode); > - if (!dup_mode) { > - ret = -ENOMEM; > - goto out; > - } > - list_add_tail(&dup_mode->head, &list); > - } > - } > - > - list_for_each_entry(connector, &dev->mode_config.connector_list, > head) { > - if (!connector->encoder) > - continue; > - if (connector->encoder->crtc == crtc) > - list_move_tail(list.next, &connector->user_modes); > - } > - > - WARN_ON(!list_empty(&list)); > - > - out: > - list_for_each_entry_safe(dup_mode, next, &list, head) > - drm_mode_destroy(dev, dup_mode); > - > - return ret; > -} > -EXPORT_SYMBOL(drm_mode_attachmode_crtc); > - > -static int drm_mode_detachmode(struct drm_device *dev, > - struct drm_connector *connector, > - struct drm_display_mode *mode) > -{ > - int found = 0; > - int ret = 0; > - struct drm_display_mode *match_mode, *t; > - > - list_for_each_entry_safe(match_mode, t, &connector->user_modes, head) > { > - if (drm_mode_equal(match_mode, mode)) { > - list_del(&match_mode->head); > - drm_mode_destroy(dev, match_mode); > - found = 1; > - break; > - } > - } > - > - if (!found) > - ret = -EINVAL; > - > - return ret; > -} > - > -int drm_mode_detachmode_crtc(struct drm_device *dev, s
[PATCH 1/2] drm/radeon: add some new SI PCI ids
From: Alex Deucher Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org --- include/drm/drm_pciids.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 918e8fe..52300c7 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h @@ -240,6 +240,7 @@ {0x1002, 0x6819, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6821, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6822, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6823, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6824, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ @@ -247,11 +248,13 @@ {0x1002, 0x6827, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x682A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x682B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x682D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x682F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6831, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6835, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6837, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6838, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6839, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ -- 1.7.7.5 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH 2/2] drm/radeon: add new richland pci ids
From: Alex Deucher Signed-off-by: Alex Deucher Cc: sta...@vger.kernel.org --- drivers/gpu/drm/radeon/ni.c |6 -- include/drm/drm_pciids.h|2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 7436b91..7969c0c 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -749,7 +749,8 @@ static void cayman_gpu_init(struct radeon_device *rdev) (rdev->pdev->device == 0x990F) || (rdev->pdev->device == 0x9910) || (rdev->pdev->device == 0x9917) || - (rdev->pdev->device == 0x)) { + (rdev->pdev->device == 0x) || + (rdev->pdev->device == 0x999C)) { rdev->config.cayman.max_simds_per_se = 6; rdev->config.cayman.max_backends_per_se = 2; } else if ((rdev->pdev->device == 0x9903) || @@ -758,7 +759,8 @@ static void cayman_gpu_init(struct radeon_device *rdev) (rdev->pdev->device == 0x990D) || (rdev->pdev->device == 0x990E) || (rdev->pdev->device == 0x9913) || - (rdev->pdev->device == 0x9918)) { + (rdev->pdev->device == 0x9918) || + (rdev->pdev->device == 0x999D)) { rdev->config.cayman.max_simds_per_se = 4; rdev->config.cayman.max_backends_per_se = 2; } else if ((rdev->pdev->device == 0x9919) || diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 52300c7..c2af598 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h @@ -606,6 +606,8 @@ {0x1002, 0x, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ {0x1002, 0x999A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ {0x1002, 0x999B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x999C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x999D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ {0x1002, 0x99A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ {0x1002, 0x99A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ {0x1002, 0x99A4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ -- 1.7.7.5 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/exynos: Don't blend mixer layer 0
This patch disables blending the mixer's layer 0 onto the background (solid color). It doesn't make sense to blend this layer by default, and causes color distortion if the layer is used for arbitrary content. Signed-off-by: Sean Paul --- drivers/gpu/drm/exynos/exynos_mixer.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index f08e251..ec3e376 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -643,12 +643,14 @@ static void mixer_win_reset(struct mixer_context *ctx) /* setting graphical layers */ val = MXR_GRP_CFG_COLOR_KEY_DISABLE; /* no blank key */ val |= MXR_GRP_CFG_WIN_BLEND_EN; - val |= MXR_GRP_CFG_BLEND_PRE_MUL; - val |= MXR_GRP_CFG_PIXEL_BLEND_EN; val |= MXR_GRP_CFG_ALPHA_VAL(0xff); /* non-transparent alpha */ - /* the same configuration for both layers */ + /* Don't blend layer 0 onto the mixer background */ mixer_reg_write(res, MXR_GRAPHIC_CFG(0), val); + + /* Blend layer 1 into layer 0 */ + val |= MXR_GRP_CFG_BLEND_PRE_MUL; + val |= MXR_GRP_CFG_PIXEL_BLEND_EN; mixer_reg_write(res, MXR_GRAPHIC_CFG(1), val); /* setting video layers */ -- 1.7.7.3 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 63933] New: Error in r300_set_framebuffer_state if use Dual-Head setup
https://bugs.freedesktop.org/show_bug.cgi?id=63933 Priority: medium Bug ID: 63933 Assignee: dri-devel@lists.freedesktop.org Summary: Error in r300_set_framebuffer_state if use Dual-Head setup Severity: normal Classification: Unclassified OS: Linux (All) Reporter: victoraur.san...@gmail.com Hardware: x86-64 (AMD64) Status: NEW Version: 9.1 Component: Drivers/DRI/r300 Product: Mesa Created attachment 78488 --> https://bugs.freedesktop.org/attachment.cgi?id=78488&action=edit Full log using compiz as gl-based wm If try to start any WM that uses GL(Compiz, Gnome-shell, etc...) i get screen completely stained and a lot of r300 error in .xsession-errors Attached full log (using compiz) Detail: if only one monitor is connected this error/bug doesn't occur and WM GL-based start correctly. -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[GIT PULL] gma500-fixes
Hi Dave Two fixes for gma500. First one from Anisse allows us to handle ASLE irqs even when BIOS doesn't trigger a pipe event irq. The second one allows dual head setups to have a big shared framebuffer. Thanks Patrik The following changes since commit 1611f8457768716ba2397e0cdcc92c863cf9b58b: drm/gma500: Add debugging info to psb_gtt_restore() (2013-04-15 23:44:56 +0200) are available in the git repository at: https://www.github.com/patjak/drm-gma500 gma500-fixes for you to fetch changes up to cbbd379aa43890f36da934f5af619d2fb8ec3d87: drm/gma500: Increase max resolution for mode setting (2013-04-25 22:23:36 +0200) Anisse Astier (1): drm/gma500: fix backlight hotkeys behaviour on netbooks Patrik Jakobsson (1): drm/gma500: Increase max resolution for mode setting drivers/gpu/drm/gma500/framebuffer.c | 4 ++-- drivers/gpu/drm/gma500/psb_irq.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 63933] Error in r300_set_framebuffer_state if use Dual-Head setup
https://bugs.freedesktop.org/show_bug.cgi?id=63933 Alex Deucher changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |NOTABUG --- Comment #1 from Alex Deucher --- As per your log, you've exceeded the hw limits of the 3D engine on your chip (max texture size of 2048x2048). /usr/bin/compiz (opengl) - Warn: Bug in window 0x1600016 (identifying as desktop_window) /usr/bin/compiz (opengl) - Warn: This window tried to create an absurdly large window 2646 x 1024 /usr/bin/compiz (opengl) - Warn: Unforunately, that's not supported on your hardware, because you have a maximum texture size of 2048 /usr/bin/compiz (opengl) - Warn: you should probably file a bug against that application /usr/bin/compiz (opengl) - Warn: for now, we're going to hide tht window so that it doesn't break your desktop -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] radeon: add bo tracking debugfs
From: Jerome Glisse This is to allow debugging of userspace program not freeing buffer after, which is basicly a memory leak. This print the list of all gem object along with their size and placement (VRAM,GTT,CPU) and with the pid of the task that created them. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h| 5 +++- drivers/gpu/drm/radeon/radeon_device.c | 5 drivers/gpu/drm/radeon/radeon_gem.c| 50 ++ 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 18904fb..bd28ee6 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -358,7 +358,8 @@ struct radeon_bo { struct radeon_device*rdev; struct drm_gem_object gem_base; - struct ttm_bo_kmap_obj dma_buf_vmap; + struct ttm_bo_kmap_obj dma_buf_vmap; + pid_t pid; }; #define gem_to_radeon_bo(gobj) container_of((gobj), struct radeon_bo, gem_base) @@ -372,6 +373,8 @@ struct radeon_bo_list { u32 tiling_flags; }; +int radeon_gem_debugfs_init(struct radeon_device *rdev); + /* sub-allocation manager, it has to be protected by another lock. * By conception this is an helper for other part of the driver * like the indirect buffer or semaphore, which both have their diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 62d0ba3..76166ae 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -1142,6 +1142,11 @@ int radeon_device_init(struct radeon_device *rdev, if (r) DRM_ERROR("ib ring test failed (%d).\n", r); + r = radeon_gem_debugfs_init(rdev); + if (r) { + DRM_ERROR("registering gem debugfs failed (%d).\n", r); + } + if (rdev->flags & RADEON_IS_AGP && !rdev->accel_working) { /* Acceleration not working on AGP card try again * with fallback to PCI or PCIE GART diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index fe5c1f6..87f8c52 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c @@ -84,6 +84,7 @@ retry: return r; } *obj = &robj->gem_base; + robj->pid = task_pid_nr(current); mutex_lock(&rdev->gem.mutex); list_add_tail(&robj->list, &rdev->gem.objects); @@ -575,3 +576,52 @@ int radeon_mode_dumb_destroy(struct drm_file *file_priv, { return drm_gem_handle_delete(file_priv, handle); } + +#if defined(CONFIG_DEBUG_FS) +static int radeon_debugfs_gem_info(struct seq_file *m, void *data) +{ + struct drm_info_node *node = (struct drm_info_node *)m->private; + struct drm_device *dev = node->minor->dev; + struct radeon_device *rdev = dev->dev_private; + struct radeon_bo *rbo; + unsigned i = 0; + + mutex_lock(&rdev->gem.mutex); + list_for_each_entry(rbo, &rdev->gem.objects, list) { + unsigned domain; + const char *placement; + + domain = radeon_mem_type_to_domain(rbo->tbo.mem.mem_type); + switch (domain) { + case RADEON_GEM_DOMAIN_VRAM: + placement = "VRAM"; + break; + case RADEON_GEM_DOMAIN_GTT: + placement = " GTT"; + break; + case RADEON_GEM_DOMAIN_CPU: + default: + placement = " CPU"; + break; + } + seq_printf(m, "bo[0x%08x] %8dkB %8dMB %s pid %8ld\n", + i, radeon_bo_size(rbo) >> 10, radeon_bo_size(rbo) >> 20, + placement, (unsigned long)rbo->pid); + i++; + } + mutex_unlock(&rdev->gem.mutex); + return 0; +} + +static struct drm_info_list radeon_debugfs_gem_list[] = { + {"radeon_gem_info", &radeon_debugfs_gem_info, 0, NULL}, +}; +#endif + +int radeon_gem_debugfs_init(struct radeon_device *rdev) +{ +#if defined(CONFIG_DEBUG_FS) + return radeon_debugfs_add_files(rdev, radeon_debugfs_gem_list, 1); +#endif + return 0; +} -- 1.8.2.1 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH] radeon: add bo tracking debugfs
On Thu, Apr 25, 2013 at 10:29 PM, wrote: > From: Jerome Glisse > > This is to allow debugging of userspace program not freeing buffer > after, which is basicly a memory leak. This print the list of all > gem object along with their size and placement (VRAM,GTT,CPU) and > with the pid of the task that created them. > > Signed-off-by: Jerome Glisse Looks good to me. Unless there are any objections, I'll pull it in for 3.10 Alex > --- > drivers/gpu/drm/radeon/radeon.h| 5 +++- > drivers/gpu/drm/radeon/radeon_device.c | 5 > drivers/gpu/drm/radeon/radeon_gem.c| 50 > ++ > 3 files changed, 59 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h > index 18904fb..bd28ee6 100644 > --- a/drivers/gpu/drm/radeon/radeon.h > +++ b/drivers/gpu/drm/radeon/radeon.h > @@ -358,7 +358,8 @@ struct radeon_bo { > struct radeon_device*rdev; > struct drm_gem_object gem_base; > > - struct ttm_bo_kmap_obj dma_buf_vmap; > + struct ttm_bo_kmap_obj dma_buf_vmap; > + pid_t pid; > }; > #define gem_to_radeon_bo(gobj) container_of((gobj), struct radeon_bo, > gem_base) > > @@ -372,6 +373,8 @@ struct radeon_bo_list { > u32 tiling_flags; > }; > > +int radeon_gem_debugfs_init(struct radeon_device *rdev); > + > /* sub-allocation manager, it has to be protected by another lock. > * By conception this is an helper for other part of the driver > * like the indirect buffer or semaphore, which both have their > diff --git a/drivers/gpu/drm/radeon/radeon_device.c > b/drivers/gpu/drm/radeon/radeon_device.c > index 62d0ba3..76166ae 100644 > --- a/drivers/gpu/drm/radeon/radeon_device.c > +++ b/drivers/gpu/drm/radeon/radeon_device.c > @@ -1142,6 +1142,11 @@ int radeon_device_init(struct radeon_device *rdev, > if (r) > DRM_ERROR("ib ring test failed (%d).\n", r); > > + r = radeon_gem_debugfs_init(rdev); > + if (r) { > + DRM_ERROR("registering gem debugfs failed (%d).\n", r); > + } > + > if (rdev->flags & RADEON_IS_AGP && !rdev->accel_working) { > /* Acceleration not working on AGP card try again > * with fallback to PCI or PCIE GART > diff --git a/drivers/gpu/drm/radeon/radeon_gem.c > b/drivers/gpu/drm/radeon/radeon_gem.c > index fe5c1f6..87f8c52 100644 > --- a/drivers/gpu/drm/radeon/radeon_gem.c > +++ b/drivers/gpu/drm/radeon/radeon_gem.c > @@ -84,6 +84,7 @@ retry: > return r; > } > *obj = &robj->gem_base; > + robj->pid = task_pid_nr(current); > > mutex_lock(&rdev->gem.mutex); > list_add_tail(&robj->list, &rdev->gem.objects); > @@ -575,3 +576,52 @@ int radeon_mode_dumb_destroy(struct drm_file *file_priv, > { > return drm_gem_handle_delete(file_priv, handle); > } > + > +#if defined(CONFIG_DEBUG_FS) > +static int radeon_debugfs_gem_info(struct seq_file *m, void *data) > +{ > + struct drm_info_node *node = (struct drm_info_node *)m->private; > + struct drm_device *dev = node->minor->dev; > + struct radeon_device *rdev = dev->dev_private; > + struct radeon_bo *rbo; > + unsigned i = 0; > + > + mutex_lock(&rdev->gem.mutex); > + list_for_each_entry(rbo, &rdev->gem.objects, list) { > + unsigned domain; > + const char *placement; > + > + domain = radeon_mem_type_to_domain(rbo->tbo.mem.mem_type); > + switch (domain) { > + case RADEON_GEM_DOMAIN_VRAM: > + placement = "VRAM"; > + break; > + case RADEON_GEM_DOMAIN_GTT: > + placement = " GTT"; > + break; > + case RADEON_GEM_DOMAIN_CPU: > + default: > + placement = " CPU"; > + break; > + } > + seq_printf(m, "bo[0x%08x] %8dkB %8dMB %s pid %8ld\n", > + i, radeon_bo_size(rbo) >> 10, radeon_bo_size(rbo) > >> 20, > + placement, (unsigned long)rbo->pid); > + i++; > + } > + mutex_unlock(&rdev->gem.mutex); > + return 0; > +} > + > +static struct drm_info_list radeon_debugfs_gem_list[] = { > + {"radeon_gem_info", &radeon_debugfs_gem_info, 0, NULL}, > +}; > +#endif > + > +int radeon_gem_debugfs_init(struct radeon_device *rdev) > +{ > +#if defined(CONFIG_DEBUG_FS) > + return radeon_debugfs_add_files(rdev, radeon_debugfs_gem_list, 1); > +#endif > + return 0; > +} > -- > 1.8.2.1 > > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel ___ dri-devel mailing list dri-de
[Bug 63935] New: TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!!
https://bugs.freedesktop.org/show_bug.cgi?id=63935 Priority: medium Bug ID: 63935 Assignee: dri-devel@lists.freedesktop.org Summary: TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! Severity: normal Classification: Unclassified OS: All Reporter: b...@b1c1l1.com Hardware: x86-64 (AMD64) Status: NEW Version: DRI CVS Component: DRM/Radeon Product: DRI Created attachment 78493 --> https://bugs.freedesktop.org/attachment.cgi?id=78493&action=edit Longer dmesg output (drm.debug=0xe) Using the code from drm-next-3.10-2 with linux-3.9-rc8, UVD does not initialize on my TURKS chip in a MacBookPro8,2. [2.610025] [drm] initializing kernel modesetting (TURKS 0x1002:0x6741 0x106B:0x00E2). [2.610055] [drm] register mmio base: 0xB080 [2.610058] [drm] register mmio size: 131072 [2.610092] radeon :01:00.0: Invalid ROM contents [2.610128] radeon :01:00.0: Invalid ROM contents [2.610149] ATOM BIOS: Apple [2.610225] [drm] GPU not posted. posting now... [2.627463] radeon :01:00.0: VRAM: 1024M 0x - 0x3FFF (1024M used) [2.627469] radeon :01:00.0: GTT: 512M 0x4000 - 0x5FFF [2.632776] [drm] Detected VRAM RAM=1024M, BAR=256M [2.632783] [drm] RAM width 128bits DDR [2.632839] [TTM] Zone kernel: Available graphics memory: 4042554 kiB [2.632842] [TTM] Zone dma32: Available graphics memory: 2097152 kiB [2.632845] [TTM] Initializing pool allocator [2.632851] [TTM] Initializing DMA pool allocator [2.632886] [drm] radeon: 1024M of VRAM memory ready [2.632889] [drm] radeon: 512M of GTT memory ready. [2.632910] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010). [2.632913] [drm] Driver supports precise vblank timestamp query. [2.632962] radeon :01:00.0: irq 45 for MSI/MSI-X [2.632973] radeon :01:00.0: radeon: using MSI. [2.633008] [drm] radeon: irq initialized. [2.635037] [drm] GART: num cpu pages 131072, num gpu pages 131072 [2.635477] [drm] probing gen 2 caps for device 8086:101 = 2212c82/0 [2.635484] [drm] PCIE gen 2 link speeds already enabled [2.635532] [drm] Loading TURKS Microcode [2.638103] [drm] PCIE GART of 512M enabled (table at 0x00273000). [2.638226] radeon :01:00.0: WB enabled [2.638231] radeon :01:00.0: fence driver on ring 0 use gpu addr 0x4c00 and cpu addr 0x880265785c00 [2.638236] radeon :01:00.0: fence driver on ring 3 use gpu addr 0x4c0c and cpu addr 0x880265785c0c [2.638540] radeon :01:00.0: fence driver on ring 5 use gpu addr 0x00072118 and cpu addr 0xc9000b932118 [2.655105] [drm] ring test on 0 succeeded in 3 usecs [2.655172] [drm] ring test on 3 succeeded in 0 usecs [2.774845] ACPI: Deprecated procfs I/F for battery is loaded, please retry with CONFIG_ACPI_PROCFS_POWER cleared [2.774856] ACPI: Battery Slot [BAT0] (battery present) [3.532304] tsc: Refined TSC clocksource calibration: 2200.015 MHz [3.532310] Switching to clocksource tsc [3.679502] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! [4.698818] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! [5.718146] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! [6.737460] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! [7.756774] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! [8.776088] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! [9.795419] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! [ 10.814734] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! [ 11.834049] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! [ 12.853380] [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!! [ 12.873372] [drm:r600_uvd_init] *ERROR* UVD not responding, giving up!!! [ 12.873377] [drm:evergreen_startup] *ERROR* radeon: error initializing UVD (-1). -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 63935] TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!!
https://bugs.freedesktop.org/show_bug.cgi?id=63935 --- Comment #1 from Alex Deucher --- Make sure you have installed the new UVD and RLC ucode for TURKS. -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 63935] TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!!
https://bugs.freedesktop.org/show_bug.cgi?id=63935 --- Comment #2 from Benjamin Lee --- These are the versions I have: blee@supra /lib/firmware/radeon $ md5sum BTC_rlc.bin SUMO_uvd.bin TURKS* 25d61fad839b30b263f52328c1f678fb BTC_rlc.bin 51d9e0e2247c313c5bfc8fa7bb5b213d SUMO_uvd.bin 158f8e21ccf228ef063888c4f637fbf0 TURKS_mc.bin 8012e24b187c6b1ba17fa48691c3b048 TURKS_me.bin 25f26ba407a9bb13528b903c617209c8 TURKS_pfp.bin They have the same hashes as what is available at http://people.freedesktop.org/~agd5f/radeon_ucode/. Is there different uvd and rlc ucode I should be using? -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 63935] TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!!
https://bugs.freedesktop.org/show_bug.cgi?id=63935 --- Comment #3 from Alex Deucher --- (In reply to comment #0) > Using the code from drm-next-3.10-2 with linux-3.9-rc8, What does this mean? Does it work ok with plain drm-next-3.10-2? perhaps you missed some patches? -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 62721] GPU lockup in Minecraft 1.5.1 with HyperZ
https://bugs.freedesktop.org/show_bug.cgi?id=62721 Maarten Baert changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Maarten Baert --- Some of the Arch packages were updated, so just to be sure I re-ran my old apitrace with both the original Arch Linux package 'ati-dri' and the one I modified with your patch. The old package again caused a lockup, the new one didn't, so it looks like this does indeed fix the lockup. Thanks! -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
RE: [PATCH Resend] drm/exynos: Select VIDEOMODE_HELPERS for FIMD
> -Original Message- > From: Sachin Kamat [mailto:sachin.ka...@linaro.org] > Sent: Thursday, April 25, 2013 8:36 PM > To: dri-devel@lists.freedesktop.org > Cc: inki@samsung.com; jy0922.s...@samsung.com; sachin.ka...@linaro.org > Subject: [PATCH Resend] drm/exynos: Select VIDEOMODE_HELPERS for FIMD > > FIMD also requires video mode helper APIs. > Without this patch we get the following build error: > drivers/gpu/drm/exynos/exynos_drm_fimd.c:895: undefined reference to > `of_get_fb_videomode' > make: *** [vmlinux] Error 1 > > Signed-off-by: Sachin Kamat > --- > drivers/gpu/drm/exynos/Kconfig |1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/exynos/Kconfig > b/drivers/gpu/drm/exynos/Kconfig > index 406f32a..8edca41 100644 > --- a/drivers/gpu/drm/exynos/Kconfig > +++ b/drivers/gpu/drm/exynos/Kconfig > @@ -27,6 +27,7 @@ config DRM_EXYNOS_FIMD > depends on OF && DRM_EXYNOS && !FB_S3C && !ARCH_MULTIPLATFORM > select OF_VIDEOMODE The above line isn't needed anymore. I just removed and merged it. And I can't find this patch on dri-devel mailing list. Maybe you didn't still subscribe dri-devel mailing list. Thanks, Inki Dae > select FB_MODE_HELPERS > + select VIDEOMODE_HELPERS > help > Choose this option if you want to use Exynos FIMD for DRM. > > -- > 1.7.9.5 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 09/21] drm: export drm_vm_open_locked
2013/4/26 Arnd Bergmann > The EXYNOS DRM driver uses drm_vm_open_locked in its mmap() function, > and it can be built as a loadable module, which currently fails. > This exports the symbol from the DRM core to avoid > > ERROR: "drm_vm_open_locked" [drivers/gpu/drm/exynos/exynosdrm.ko] > undefined! > > Signed-off-by: Arnd Bergmann > Cc: David Airlie > Cc: dri-devel@lists.freedesktop.org > Cc: Inki Dae > Cc: Joonyoung Shim > Cc: Seung-Woo Kim > Cc: Kyungmin Park > --- > drivers/gpu/drm/drm_vm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c > index db7bd29..1d4f7c9 100644 > --- a/drivers/gpu/drm/drm_vm.c > +++ b/drivers/gpu/drm/drm_vm.c > @@ -422,6 +422,7 @@ void drm_vm_open_locked(struct drm_device *dev, > list_add(&vma_entry->head, &dev->vmalist); > } > } > +EXPORT_SYMBOL_GPL(drm_vm_open_locked); > > Checked it out. Acked-by: Inki Dae Thanks, Inki Dae static void drm_vm_open(struct vm_area_struct *vma) > { > -- > 1.8.1.2 > > ___ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel > ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm/exynos: fix multiple definition build error
This patch fixes multiple definition error like below when building it as moudle with device tree support. drivers/gpu/drm/exynos/exynos_drm_g2d.o: In function `.LANCHOR1': exynos_drm_g2d.c:(.rodata+0x6c): multiple definition of `__mod_of_device_table' drivers/gpu/drm/exynos/exynos_drm_fimd.o:exynos_drm_fimd.c:(.rodata+0x144): first defined here Signed-off-by: Inki Dae Signed-off-by: Kyungmin Park --- drivers/gpu/drm/exynos/exynos_drm_fimd.c |2 +- drivers/gpu/drm/exynos/exynos_drm_g2d.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 746b282..1e02d13 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -117,7 +117,7 @@ static const struct of_device_id fimd_driver_dt_match[] = { .data = &exynos5_fimd_driver_data }, {}, }; -MODULE_DEVICE_TABLE(of, fimd_driver_dt_match); +MODULE_DEVICE_TABLE(of_fimd, fimd_driver_dt_match); #endif static inline struct fimd_driver_data *drm_fimd_get_driver_data( diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 47a493c..6a01ff1 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -1525,7 +1525,7 @@ static const struct of_device_id exynos_g2d_match[] = { { .compatible = "samsung,exynos5250-g2d" }, {}, }; -MODULE_DEVICE_TABLE(of, exynos_g2d_match); +MODULE_DEVICE_TABLE(of_g2d, exynos_g2d_match); #endif struct platform_driver g2d_driver = { -- 1.7.5.4 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm: shmobile: Use devm_* managed functions
This simplifies cleanup paths and fixes a probe time crash in the error path when trying to cleanup mode setting before it was initialized. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 28 +--- drivers/gpu/drm/shmobile/shmob_drm_plane.c | 7 +-- 2 files changed, 10 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c index f6e0b53..29d15e3 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c @@ -90,7 +90,7 @@ static int shmob_drm_setup_clocks(struct shmob_drm_device *sdev, return -EINVAL; } - clk = clk_get(sdev->dev, clkname); + clk = devm_clk_get(sdev->dev, clkname); if (IS_ERR(clk)) { dev_err(sdev->dev, "cannot get dot clock %s\n", clkname); return PTR_ERR(clk); @@ -106,21 +106,12 @@ static int shmob_drm_setup_clocks(struct shmob_drm_device *sdev, static int shmob_drm_unload(struct drm_device *dev) { - struct shmob_drm_device *sdev = dev->dev_private; - drm_kms_helper_poll_fini(dev); drm_mode_config_cleanup(dev); drm_vblank_cleanup(dev); drm_irq_uninstall(dev); - if (sdev->clock) - clk_put(sdev->clock); - - if (sdev->mmio) - iounmap(sdev->mmio); - dev->dev_private = NULL; - kfree(sdev); return 0; } @@ -139,7 +130,7 @@ static int shmob_drm_load(struct drm_device *dev, unsigned long flags) return -EINVAL; } - sdev = kzalloc(sizeof(*sdev), GFP_KERNEL); + sdev = devm_kzalloc(&pdev->dev, sizeof(*sdev), GFP_KERNEL); if (sdev == NULL) { dev_err(dev->dev, "failed to allocate private data\n"); return -ENOMEM; @@ -156,29 +147,28 @@ static int shmob_drm_load(struct drm_device *dev, unsigned long flags) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res == NULL) { dev_err(&pdev->dev, "failed to get memory resource\n"); - ret = -EINVAL; - goto done; + return -EINVAL; } - sdev->mmio = ioremap_nocache(res->start, resource_size(res)); + sdev->mmio = devm_ioremap_nocache(&pdev->dev, res->start, + resource_size(res)); if (sdev->mmio == NULL) { dev_err(&pdev->dev, "failed to remap memory resource\n"); - ret = -ENOMEM; - goto done; + return -ENOMEM; } ret = shmob_drm_setup_clocks(sdev, pdata->clk_source); if (ret < 0) - goto done; + return ret; ret = shmob_drm_init_interface(sdev); if (ret < 0) - goto done; + return ret; ret = shmob_drm_modeset_init(sdev); if (ret < 0) { dev_err(&pdev->dev, "failed to initialize mode setting\n"); - goto done; + return ret; } for (i = 0; i < 4; ++i) { diff --git a/drivers/gpu/drm/shmobile/shmob_drm_plane.c b/drivers/gpu/drm/shmobile/shmob_drm_plane.c index e1eb899..6898f6f 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_plane.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_plane.c @@ -221,11 +221,8 @@ static int shmob_drm_plane_disable(struct drm_plane *plane) static void shmob_drm_plane_destroy(struct drm_plane *plane) { - struct shmob_drm_plane *splane = to_shmob_plane(plane); - shmob_drm_plane_disable(plane); drm_plane_cleanup(plane); - kfree(splane); } static const struct drm_plane_funcs shmob_drm_plane_funcs = { @@ -251,7 +248,7 @@ int shmob_drm_plane_create(struct shmob_drm_device *sdev, unsigned int index) struct shmob_drm_plane *splane; int ret; - splane = kzalloc(sizeof(*splane), GFP_KERNEL); + splane = devm_kzalloc(sdev->dev, sizeof(*splane), GFP_KERNEL); if (splane == NULL) return -ENOMEM; @@ -261,8 +258,6 @@ int shmob_drm_plane_create(struct shmob_drm_device *sdev, unsigned int index) ret = drm_plane_init(sdev->ddev, &splane->plane, 1, &shmob_drm_plane_funcs, formats, ARRAY_SIZE(formats), false); - if (ret < 0) - kfree(splane); return ret; } -- Regards, Laurent Pinchart ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH Resend] drm/exynos: Select VIDEOMODE_HELPERS for FIMD
FIMD also requires video mode helper APIs. Without this patch we get the following build error: drivers/gpu/drm/exynos/exynos_drm_fimd.c:895: undefined reference to `of_get_fb_videomode' make: *** [vmlinux] Error 1 Signed-off-by: Sachin Kamat --- drivers/gpu/drm/exynos/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 406f32a..8edca41 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -27,6 +27,7 @@ config DRM_EXYNOS_FIMD depends on OF && DRM_EXYNOS && !FB_S3C && !ARCH_MULTIPLATFORM select OF_VIDEOMODE select FB_MODE_HELPERS + select VIDEOMODE_HELPERS help Choose this option if you want to use Exynos FIMD for DRM. -- 1.7.9.5 ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH Resend] drm/exynos: Select VIDEOMODE_HELPERS for FIMD
On 26 April 2013 10:11, Inki Dae wrote: > > >> -Original Message- >> From: Sachin Kamat [mailto:sachin.ka...@linaro.org] >> Sent: Thursday, April 25, 2013 8:36 PM >> To: dri-devel@lists.freedesktop.org >> Cc: inki@samsung.com; jy0922.s...@samsung.com; sachin.ka...@linaro.org >> Subject: [PATCH Resend] drm/exynos: Select VIDEOMODE_HELPERS for FIMD >> >> FIMD also requires video mode helper APIs. >> Without this patch we get the following build error: >> drivers/gpu/drm/exynos/exynos_drm_fimd.c:895: undefined reference to >> `of_get_fb_videomode' >> make: *** [vmlinux] Error 1 >> >> Signed-off-by: Sachin Kamat >> --- >> drivers/gpu/drm/exynos/Kconfig |1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/drivers/gpu/drm/exynos/Kconfig >> b/drivers/gpu/drm/exynos/Kconfig >> index 406f32a..8edca41 100644 >> --- a/drivers/gpu/drm/exynos/Kconfig >> +++ b/drivers/gpu/drm/exynos/Kconfig >> @@ -27,6 +27,7 @@ config DRM_EXYNOS_FIMD >> depends on OF && DRM_EXYNOS && !FB_S3C && !ARCH_MULTIPLATFORM >> select OF_VIDEOMODE > > The above line isn't needed anymore. I just removed and merged it. Thanks Inki. > And I can't find this patch on dri-devel mailing list. Maybe you didn't still > subscribe dri-devel mailing list. Let me check what this problem is. dri-devel was supposed to be a open list. Has this been changed recently? -- With warm regards, Sachin ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 63935] TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!!
https://bugs.freedesktop.org/show_bug.cgi?id=63935 --- Comment #4 from Benjamin Lee --- Thanks for the suggestion. I built drm-next-3.10-2 and got the same issue. I had to apply patches fffe01f7a768d07cc50ace71abe28fbf2f786a43 (PCI: Add PCI ROM helper for platform-provided ROM images) and 06a08570085b3b20c45f45dc66dc46851ecbcb5b (radeon: Attempt to use platform-provided ROM image) from 3.9-rc6 for my system to boot, but other than that it is unmodified. -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 63935] TURKS [drm:r600_uvd_init] *ERROR* UVD not responding, trying to reset the VCPU!!!
https://bugs.freedesktop.org/show_bug.cgi?id=63935 Benjamin Lee changed: What|Removed |Added Attachment #78493|0 |1 is obsolete|| --- Comment #5 from Benjamin Lee --- Created attachment 78497 --> https://bugs.freedesktop.org/attachment.cgi?id=78497&action=edit dmesg from drm-next-3.10-2 plus fix for EFI boot regression -- You are receiving this mail because: You are the assignee for the bug. ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
[Bug 63702] tiling2d in radeon trash vdpau UVD textures
https://bugs.freedesktop.org/show_bug.cgi?id=63702 --- Comment #8 from Rafael Castillo --- effectively this patch restore UVD to its previous state, thx on another subject since the begin Mpeg1 and WMV3 does not work [mpeg1 green block and random color blocks dancing ] and WMV3[blackscreen and few secs later high chance of hard lock] h264, divx and Mpeg2 works peachy so far, should i open another bug report? you need any info or example or debug info? again thanks for your dedication -- 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/20130425/d5a865cf/attachment-0001.html>
[Bug 63865] radeon_atombios_get_power_modes oops with E-350
https://bugs.freedesktop.org/show_bug.cgi?id=63865 --- Comment #2 from Hieu Hoang --- Created attachment 78440 --> https://bugs.freedesktop.org/attachment.cgi?id=78440&action=edit vbios from e-350 GPU linux 3.7.9 works fine, I'll try to obtain earlier 3.8.x packages to test. -- 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/20130425/de88d1d2/attachment.html>
[Bug 63748] GPU Lockup playing urban terror
https://bugs.freedesktop.org/show_bug.cgi?id=63748 --- Comment #5 from dinolib --- I compiled tag mesa-9.1.1 from git. After 30 minutes no lockups! Compile parameters: ./configure --prefix=/usr \ --with-dri-driverdir=/usr/lib/xorg/modules/dri \ --with-gallium-drivers=r300,r600,nouveau,svga,swrast \ --with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \ --enable-gallium-llvm \ --enable-gallium-egl \ --with-egl-platforms=x11,drm \ --enable-shared-glapi \ --enable-gbm \ --enable-glx-tls \ --enable-dri \ --enable-glx \ --enable-osmesa \ --enable-gles1 \ --enable-gles2 \ --enable-egl \ --enable-texture-float \ --enable-xa \ --enable-vdpau -- 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/20130425/e1b2157f/attachment.html>
[Bug 63702] tiling2d in radeon trash vdpau UVD textures
https://bugs.freedesktop.org/show_bug.cgi?id=63702 Christian K?nig changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #9 from Christian K?nig --- If you got other bugs then please open up a new bug report. -- 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/20130425/c9fcbaa9/attachment.html>
[PATCH] drm/radeon: fix endian bugs in atom_allocate_fb_scratch()
On Mit, 2013-04-24 at 14:40 -0400, alexdeucher at gmail.com wrote: > From: Alex Deucher > > Signed-off-by: Alex Deucher > Cc: stable at vger.kernel.org > --- > drivers/gpu/drm/radeon/atom.c |6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c > index 46a9c37..fb441a7 100644 > --- a/drivers/gpu/drm/radeon/atom.c > +++ b/drivers/gpu/drm/radeon/atom.c > @@ -1394,10 +1394,10 @@ int atom_allocate_fb_scratch(struct atom_context *ctx) > firmware_usage = (struct _ATOM_VRAM_USAGE_BY_FIRMWARE > *)(ctx->bios + data_offset); > > DRM_DEBUG("atom firmware requested %08x %dkb\n", > - > firmware_usage->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware, > - > firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb); > + > le32_to_cpu(firmware_usage->asFirmwareVramReserveInfo[0].ulStartAddrUsedByFirmware), > + > le16_to_cpu(firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb)); > > - usage_bytes = > firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb * 1024; > + usage_bytes = > le16_to_cpu(firmware_usage->asFirmwareVramReserveInfo[0].usFirmwareUseInKb) * > 1024; > } Reviwed-by: Michel D?nzer -- Earthling Michel D?nzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer
[PATCHv4 1/2] ppc64: perform proper max_bus_speed detection
On Wed, Apr 24, 2013 at 07:54:49PM -0300, lucaskt at linux.vnet.ibm.com wrote: > From: Lucas Kannebley Tavares > > On pseries machines the detection for max_bus_speed should be done > through an OpenFirmware property. This patch adds a function to perform > this detection and a hook to perform dynamic adding of the function only for > pseries. This is done by overwriting the weak > pcibios_root_bridge_prepare function which is called by pci_create_root_bus(). > > Signed-off-by: Lucas Kannebley Tavares > --- > arch/powerpc/include/asm/machdep.h | 2 ++ > arch/powerpc/kernel/pci-common.c | 8 + > arch/powerpc/platforms/pseries/pci.c | 51 > > arch/powerpc/platforms/pseries/pseries.h | 4 +++ > arch/powerpc/platforms/pseries/setup.c | 2 ++ > 5 files changed, 67 insertions(+) > > diff --git a/arch/powerpc/include/asm/machdep.h > b/arch/powerpc/include/asm/machdep.h > index 3d6b410..8f558bf 100644 > --- a/arch/powerpc/include/asm/machdep.h > +++ b/arch/powerpc/include/asm/machdep.h > @@ -107,6 +107,8 @@ struct machdep_calls { > void(*pcibios_fixup)(void); > int (*pci_probe_mode)(struct pci_bus *); > void(*pci_irq_fixup)(struct pci_dev *dev); > + int (*pcibios_root_bridge_prepare)(struct pci_host_bridge > + *bridge); > > /* To setup PHBs when using automatic OF platform driver for PCI */ > int (*pci_setup_phb)(struct pci_controller *host); > diff --git a/arch/powerpc/kernel/pci-common.c > b/arch/powerpc/kernel/pci-common.c > index fa12ae4..80986cf 100644 > --- a/arch/powerpc/kernel/pci-common.c > +++ b/arch/powerpc/kernel/pci-common.c > @@ -844,6 +844,14 @@ int pci_proc_domain(struct pci_bus *bus) > return 1; > } > > +int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) > +{ > + if (ppc_md.pcibios_root_bridge_prepare) > + return ppc_md.pcibios_root_bridge_prepare(bridge); > + > + return 0; > +} > + > /* This header fixup will do the resource fixup for all devices as they are > * probed, but not for bridge ranges > */ > diff --git a/arch/powerpc/platforms/pseries/pci.c > b/arch/powerpc/platforms/pseries/pci.c > index 0b580f4..7f9c956 100644 > --- a/arch/powerpc/platforms/pseries/pci.c > +++ b/arch/powerpc/platforms/pseries/pci.c > @@ -108,3 +108,54 @@ static void fixup_winbond_82c105(struct pci_dev* dev) > } > DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, >fixup_winbond_82c105); > + > +int pseries_root_bridge_prepare(struct pci_host_bridge *bridge) > +{ > + struct device_node *dn, *pdn; > + struct pci_bus *bus; > + const uint32_t *pcie_link_speed_stats; > + > + bus = bridge->bus; > + > + dn = pcibios_get_phb_of_node(bus); > + if (!dn) > + return 0; > + > + for (pdn = dn; pdn != NULL; pdn = pdn->parent) { > + pcie_link_speed_stats = (const uint32_t *) of_get_property(dn, > + "ibm,pcie-link-speed-stats", NULL); > + if (pcie_link_speed_stats) > + break; > + } Please use the helpers in include/linux/of.h rather than open coding this. Yours Tony -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20130425/73f66f39/attachment-0001.pgp>
[Bug 62466] r600g hyperz lockups with KSP 0.19
https://bugs.freedesktop.org/show_bug.cgi?id=62466 --- Comment #7 from Knut Andre Tidemann --- That patch fixes the bug! I can reliably reproduce it in a few seconds without the patch, but I have not been able to get a GPU hang after I applied the patch! I've only done minimal teseting, 5-10 min, but everything works great. -- 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/20130425/f8312215/attachment.html>
[PATCH] drm/shmobile: Fix race condition between page flip request and handler
On Thursday 28 March 2013 16:10:02 Laurent Pinchart wrote: > Hi Dave, > > Could you please pick this patch for v3.10 ? Ping ? > On Tuesday 12 March 2013 15:38:43 Laurent Pinchart wrote: > > The page flip handler stores the page flip event pointer and then calls > > drm_vblank_get() to enable the vblank interrupt. Due to the vblank off > > delay, the vblank interrupt can be enabled in the hardware at that > > point, even if the vblank reference count is equal to 0. If a vblank > > interrupt is triggered between storing the event pointer and calling > > drm_vblank_get(), the page flip completion handler will process the > > event and call drm_vblank_put() with a reference count equal to 0. This > > will result in a BUG_ON. > > > > Fix the race condition by calling drm_vblank_get() before storing the > > event pointer. > > > > Signed-off-by: Laurent Pinchart > > > > --- > > > > drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c index d917a41..7dff49e 100644 > > --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > @@ -494,10 +494,10 @@ static int shmob_drm_crtc_page_flip(struct drm_crtc > > *crtc, > > > > if (event) { > > > > event->pipe = 0; > > > > + drm_vblank_get(dev, 0); > > > > spin_lock_irqsave(&dev->event_lock, flags); > > scrtc->event = event; > > spin_unlock_irqrestore(&dev->event_lock, flags); > > > > - drm_vblank_get(dev, 0); > > > > } > > > > return 0; -- Regards, Laurent Pinchart
[Bug 63865] radeon_atombios_get_power_modes oops with E-350
https://bugs.freedesktop.org/show_bug.cgi?id=63865 --- Comment #3 from Alex Deucher --- (In reply to comment #2) > linux 3.7.9 works fine, I'll try to obtain earlier 3.8.x packages to test. Any chance you could bisect? -- 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/20130425/2d6b936b/attachment.html>
[Bug 63865] radeon_atombios_get_power_modes oops with E-350
https://bugs.freedesktop.org/show_bug.cgi?id=63865 --- Comment #4 from Alex Deucher --- Created attachment 78471 --> https://bugs.freedesktop.org/attachment.cgi?id=78471&action=edit Possible fix The attached patch should fix it, but I don't see how any kernel ever would have worked with your card. Did you change any bios settings or flash your bios recently? -- 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/20130425/926b0609/attachment.html>
[Bug 62959] r600g (HD 6950 Cayman) fails piglit tests and hangs system
https://bugs.freedesktop.org/show_bug.cgi?id=62959 --- Comment #60 from udo --- The first bisect kernel I try gives me youtube videos that are blocks of gibberish. What to do about that? 3.7.1. crashed like previous kernels (showing text boot screen) but no messages in the log. So is that the same problem we're seeing and searching for? -- 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/20130425/25df42a7/attachment.html>
[PATCH] drm/radeon: allocate SA bo in the requested domain
From: Christian K?nig This avoid moving the BO directly after allocating it. Signed-off-by: Christian K?nig --- drivers/gpu/drm/radeon/radeon_sa.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_sa.c b/drivers/gpu/drm/radeon/radeon_sa.c index cb80099..0abe5a9 100644 --- a/drivers/gpu/drm/radeon/radeon_sa.c +++ b/drivers/gpu/drm/radeon/radeon_sa.c @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device *rdev, } r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true, -RADEON_GEM_DOMAIN_CPU, NULL, &sa_manager->bo); +domain, NULL, &sa_manager->bo); if (r) { dev_err(rdev->dev, "(%d) failed to allocate bo for manager\n", r); return r; -- 1.7.10.4
[PATCH] drm/radeon: allocate SA bo in the requested domain
On Thu, Apr 25, 2013 at 12:19 PM, Christian K?nig wrote: > From: Christian K?nig > > This avoid moving the BO directly after allocating it. > > Signed-off-by: Christian K?nig Looks good. Applied to my tree. Alex > --- > drivers/gpu/drm/radeon/radeon_sa.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_sa.c > b/drivers/gpu/drm/radeon/radeon_sa.c > index cb80099..0abe5a9 100644 > --- a/drivers/gpu/drm/radeon/radeon_sa.c > +++ b/drivers/gpu/drm/radeon/radeon_sa.c > @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device *rdev, > } > > r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true, > -RADEON_GEM_DOMAIN_CPU, NULL, &sa_manager->bo); > +domain, NULL, &sa_manager->bo); > if (r) { > dev_err(rdev->dev, "(%d) failed to allocate bo for > manager\n", r); > return r; > -- > 1.7.10.4 >
[PATCH] drm/radeon: allocate SA bo in the requested domain
Am 25.04.2013 18:40, schrieb Alex Deucher: > On Thu, Apr 25, 2013 at 12:19 PM, Christian K?nig > wrote: >> From: Christian K?nig >> >> This avoid moving the BO directly after allocating it. >> >> Signed-off-by: Christian K?nig > Looks good. Applied to my tree. Have you also seen/applied "[PATCH] drm/radeon: fix scratch reg handling for UVD fence"? That one is more important cause it fixes a real bug, while this patch is just a cleanup. Christian. > Alex > >> --- >> drivers/gpu/drm/radeon/radeon_sa.c |2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/radeon/radeon_sa.c >> b/drivers/gpu/drm/radeon/radeon_sa.c >> index cb80099..0abe5a9 100644 >> --- a/drivers/gpu/drm/radeon/radeon_sa.c >> +++ b/drivers/gpu/drm/radeon/radeon_sa.c >> @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device *rdev, >> } >> >> r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true, >> -RADEON_GEM_DOMAIN_CPU, NULL, &sa_manager->bo); >> +domain, NULL, &sa_manager->bo); >> if (r) { >> dev_err(rdev->dev, "(%d) failed to allocate bo for >> manager\n", r); >> return r; >> -- >> 1.7.10.4 >>
[PATCH] drm/radeon: allocate SA bo in the requested domain
On Thu, Apr 25, 2013 at 12:47 PM, Christian K?nig wrote: > Am 25.04.2013 18:40, schrieb Alex Deucher: > >> On Thu, Apr 25, 2013 at 12:19 PM, Christian K?nig >> wrote: >>> >>> From: Christian K?nig >>> >>> This avoid moving the BO directly after allocating it. >>> >>> Signed-off-by: Christian K?nig >> >> Looks good. Applied to my tree. > > > Have you also seen/applied "[PATCH] drm/radeon: fix scratch reg handling for > UVD fence"? > > That one is more important cause it fixes a real bug, while this patch is > just a cleanup. I'll grab that one too. Alex > > Christian. > > >> Alex >> >>> --- >>> drivers/gpu/drm/radeon/radeon_sa.c |2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/gpu/drm/radeon/radeon_sa.c >>> b/drivers/gpu/drm/radeon/radeon_sa.c >>> index cb80099..0abe5a9 100644 >>> --- a/drivers/gpu/drm/radeon/radeon_sa.c >>> +++ b/drivers/gpu/drm/radeon/radeon_sa.c >>> @@ -64,7 +64,7 @@ int radeon_sa_bo_manager_init(struct radeon_device >>> *rdev, >>> } >>> >>> r = radeon_bo_create(rdev, size, RADEON_GPU_PAGE_SIZE, true, >>> -RADEON_GEM_DOMAIN_CPU, NULL, >>> &sa_manager->bo); >>> +domain, NULL, &sa_manager->bo); >>> if (r) { >>> dev_err(rdev->dev, "(%d) failed to allocate bo for >>> manager\n", r); >>> return r; >>> -- >>> 1.7.10.4 >>> >
[PATCH 1/3] drm: Make drm_ioctls const
From: Ville Syrj?l? We never modify the contents of drm_ioctls, so make it const. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 0ac1991..80c6895 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -60,7 +60,7 @@ static int drm_version(struct drm_device *dev, void *data, [DRM_IOCTL_NR(ioctl)] = {.cmd = ioctl, .func = _func, .flags = _flags, .cmd_drv = 0} /** Ioctl table */ -static struct drm_ioctl_desc drm_ioctls[] = { +static const struct drm_ioctl_desc drm_ioctls[] = { DRM_IOCTL_DEF(DRM_IOCTL_VERSION, drm_version, DRM_UNLOCKED), DRM_IOCTL_DEF(DRM_IOCTL_GET_UNIQUE, drm_getunique, 0), DRM_IOCTL_DEF(DRM_IOCTL_GET_MAGIC, drm_getmagic, 0), @@ -375,7 +375,7 @@ long drm_ioctl(struct file *filp, { struct drm_file *file_priv = filp->private_data; struct drm_device *dev; - struct drm_ioctl_desc *ioctl; + const struct drm_ioctl_desc *ioctl; drm_ioctl_t *func; unsigned int nr = DRM_IOCTL_NR(cmd); int retcode = -EINVAL; -- 1.8.1.5
[PATCH 3/3] drm: Kill user_modes list and the associated ioctls
From: Ville Syrj?l? There is no way to use modes added to the user_modes list. We never look at the contents of said list in the kernel, and the only operations userspace can do are attach and detach. So the only "benefit" of this interface is wasting kernel memory. Fortunately it seems no real user space application ever used these ioctls. So just kill them. Also remove the prototypes for the non-existing drm_mode_addmode_ioctl() and drm_mode_rmmode_ioctl() functions. Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c | 190 - drivers/gpu/drm/drm_drv.c | 2 - include/drm/drm_crtc.h | 15 include/uapi/drm/drm.h | 4 +- 4 files changed, 2 insertions(+), 209 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 287cd82..3a8f7e6d 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -703,7 +703,6 @@ int drm_connector_init(struct drm_device *dev, connector->connector_type = connector_type; connector->connector_type_id = ++drm_connector_enum_list[connector_type].count; /* TODO */ - INIT_LIST_HEAD(&connector->user_modes); INIT_LIST_HEAD(&connector->probed_modes); INIT_LIST_HEAD(&connector->modes); connector->edid_blob_ptr = NULL; @@ -744,9 +743,6 @@ void drm_connector_cleanup(struct drm_connector *connector) list_for_each_entry_safe(mode, t, &connector->modes, head) drm_mode_remove(connector, mode); - list_for_each_entry_safe(mode, t, &connector->user_modes, head) - drm_mode_remove(connector, mode); - drm_mode_object_put(dev, &connector->base); list_del(&connector->head); dev->mode_config.num_connector--; @@ -2613,192 +2609,6 @@ void drm_fb_release(struct drm_file *priv) mutex_unlock(&priv->fbs_lock); } -/** - * drm_mode_attachmode - add a mode to the user mode list - * @dev: DRM device - * @connector: connector to add the mode to - * @mode: mode to add - * - * Add @mode to @connector's user mode list. - */ -static void drm_mode_attachmode(struct drm_device *dev, - struct drm_connector *connector, - struct drm_display_mode *mode) -{ - list_add_tail(&mode->head, &connector->user_modes); -} - -int drm_mode_attachmode_crtc(struct drm_device *dev, struct drm_crtc *crtc, -const struct drm_display_mode *mode) -{ - struct drm_connector *connector; - int ret = 0; - struct drm_display_mode *dup_mode, *next; - LIST_HEAD(list); - - list_for_each_entry(connector, &dev->mode_config.connector_list, head) { - if (!connector->encoder) - continue; - if (connector->encoder->crtc == crtc) { - dup_mode = drm_mode_duplicate(dev, mode); - if (!dup_mode) { - ret = -ENOMEM; - goto out; - } - list_add_tail(&dup_mode->head, &list); - } - } - - list_for_each_entry(connector, &dev->mode_config.connector_list, head) { - if (!connector->encoder) - continue; - if (connector->encoder->crtc == crtc) - list_move_tail(list.next, &connector->user_modes); - } - - WARN_ON(!list_empty(&list)); - - out: - list_for_each_entry_safe(dup_mode, next, &list, head) - drm_mode_destroy(dev, dup_mode); - - return ret; -} -EXPORT_SYMBOL(drm_mode_attachmode_crtc); - -static int drm_mode_detachmode(struct drm_device *dev, - struct drm_connector *connector, - struct drm_display_mode *mode) -{ - int found = 0; - int ret = 0; - struct drm_display_mode *match_mode, *t; - - list_for_each_entry_safe(match_mode, t, &connector->user_modes, head) { - if (drm_mode_equal(match_mode, mode)) { - list_del(&match_mode->head); - drm_mode_destroy(dev, match_mode); - found = 1; - break; - } - } - - if (!found) - ret = -EINVAL; - - return ret; -} - -int drm_mode_detachmode_crtc(struct drm_device *dev, struct drm_display_mode *mode) -{ - struct drm_connector *connector; - - list_for_each_entry(connector, &dev->mode_config.connector_list, head) { - drm_mode_detachmode(dev, connector, mode); - } - return 0; -} -EXPORT_SYMBOL(drm_mode_detachmode_crtc); - -/** - * drm_fb_attachmode - Attach a user mode to an connector - * @dev: drm device for the ioctl - * @data: data pointer for the ioctl - * @file_priv: drm file for the ioctl call - * - * This attaches a user specified mode to an connector. - * Called
[PATCH 2/3] drm: Silence some sparse warnings
From: Ville Syrj?l? drivers/gpu/drm/drm_pci.c:155:5: warning: symbol 'drm_pci_set_busid' was not declared. Should it be static? drivers/gpu/drm/drm_pci.c:197:5: warning: symbol 'drm_pci_set_unique' was not declared. Should it be static? drivers/gpu/drm/drm_pci.c:269:5: warning: symbol 'drm_pci_agp_init' was not declared. Should it be static? drivers/gpu/drm/drm_crtc.c:181:1: warning: symbol 'drm_get_dirty_info_name' was not declared. Should it be static? drivers/gpu/drm/drm_crtc.c:1123:5: warning: symbol 'drm_mode_group_init' was not declared. Should it be static? drivers/gpu/drm/drm_modes.c:918:6: warning: symbol 'drm_mode_validate_clocks' was not declared. Should it be static? Signed-off-by: Ville Syrj?l? --- drivers/gpu/drm/drm_crtc.c | 5 + drivers/gpu/drm/drm_pci.c | 10 +- include/drm/drm_crtc.h | 3 +++ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index c577bae..287cd82 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -178,9 +178,6 @@ static struct drm_prop_enum_list drm_dirty_info_enum_list[] = { { DRM_MODE_DIRTY_ANNOTATE, "Annotate" }, }; -DRM_ENUM_NAME_FN(drm_get_dirty_info_name, -drm_dirty_info_enum_list) - struct drm_conn_prop_enum_list { int type; char *name; @@ -1120,7 +1117,7 @@ int drm_mode_create_dirty_info_property(struct drm_device *dev) } EXPORT_SYMBOL(drm_mode_create_dirty_info_property); -int drm_mode_group_init(struct drm_device *dev, struct drm_mode_group *group) +static int drm_mode_group_init(struct drm_device *dev, struct drm_mode_group *group) { uint32_t total_objects = 0; diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index bd719e9..14194b6 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c @@ -152,7 +152,7 @@ static const char *drm_pci_get_name(struct drm_device *dev) return pdriver->name; } -int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master) +static int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master) { int len, ret; struct pci_driver *pdriver = dev->driver->kdriver.pci; @@ -194,9 +194,9 @@ err: return ret; } -int drm_pci_set_unique(struct drm_device *dev, - struct drm_master *master, - struct drm_unique *u) +static int drm_pci_set_unique(struct drm_device *dev, + struct drm_master *master, + struct drm_unique *u) { int domain, bus, slot, func, ret; const char *bus_name; @@ -266,7 +266,7 @@ static int drm_pci_irq_by_busid(struct drm_device *dev, struct drm_irq_busid *p) return 0; } -int drm_pci_agp_init(struct drm_device *dev) +static int drm_pci_agp_init(struct drm_device *dev) { if (drm_core_has_AGP(dev)) { if (drm_pci_device_is_agp(dev)) diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 8c7846b..619ea86 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -938,6 +938,9 @@ extern void drm_mode_list_concat(struct list_head *head, extern void drm_mode_validate_size(struct drm_device *dev, struct list_head *mode_list, int maxX, int maxY, int maxPitch); +extern void drm_mode_validate_clocks(struct drm_device *dev, +struct list_head *mode_list, +int *min, int *max, int n_ranges); extern void drm_mode_prune_invalid(struct drm_device *dev, struct list_head *mode_list, bool verbose); extern void drm_mode_sort(struct list_head *mode_list); -- 1.8.1.5
[PATCH libdrm] Deprecate drmModeAttachMode and drmModeDetachMode
From: Ville Syrj?l? The kernel no longer implements the ioctls, and they never did anything useful. Signed-off-by: Ville Syrj?l? --- xf86drmMode.c | 16 xf86drmMode.h | 10 ++ 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/xf86drmMode.c b/xf86drmMode.c index f603ceb..74e074d 100644 --- a/xf86drmMode.c +++ b/xf86drmMode.c @@ -539,24 +539,16 @@ err_allocs: return r; } +/* deprecated */ int drmModeAttachMode(int fd, uint32_t connector_id, drmModeModeInfoPtr mode_info) { - struct drm_mode_mode_cmd res; - - memcpy(&res.mode, mode_info, sizeof(struct drm_mode_modeinfo)); - res.connector_id = connector_id; - - return DRM_IOCTL(fd, DRM_IOCTL_MODE_ATTACHMODE, &res); + return -EINVAL; } +/* deprecated */ int drmModeDetachMode(int fd, uint32_t connector_id, drmModeModeInfoPtr mode_info) { - struct drm_mode_mode_cmd res; - - memcpy(&res.mode, mode_info, sizeof(struct drm_mode_modeinfo)); - res.connector_id = connector_id; - - return DRM_IOCTL(fd, DRM_IOCTL_MODE_DETACHMODE, &res); + return -EINVAL; } diff --git a/xf86drmMode.h b/xf86drmMode.h index 8e40034..0f0c26b 100644 --- a/xf86drmMode.h +++ b/xf86drmMode.h @@ -398,15 +398,9 @@ drmModeEncoderPtr drmModeGetEncoder(int fd, uint32_t encoder_id); extern drmModeConnectorPtr drmModeGetConnector(int fd, uint32_t connectorId); -/** - * Attaches the given mode to an connector. - */ +/* deprecated */ extern int drmModeAttachMode(int fd, uint32_t connectorId, drmModeModeInfoPtr mode_info); - -/** - * Detaches a mode from the connector - * must be unused, by the given mode. - */ +/* deprecated */ extern int drmModeDetachMode(int fd, uint32_t connectorId, drmModeModeInfoPtr mode_info); extern drmModePropertyPtr drmModeGetProperty(int fd, uint32_t propertyId); -- 1.8.1.5
[PATCH 08/21] drm/nouveau: use mdelay instead of large udelay constants
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those. Signed-off-by: Arnd Bergmann Cc: David Airlie Cc: Ben Skeggs Cc: dri-devel at lists.freedesktop.org --- drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c index d0817d9..ed7415e 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c @@ -51,7 +51,8 @@ nv50_dac_sense(struct nv50_disp_priv *priv, int or, u32 loadval) const u32 doff = (or * 0x800); int load = -EINVAL; nv_wr32(priv, 0x61a00c + doff, 0x0010 | loadval); - udelay(9500); + mdelay(9); + udelay(500); nv_wr32(priv, 0x61a00c + doff, 0x8000); load = (nv_rd32(priv, 0x61a00c + doff) & 0x3800) >> 27; nv_wr32(priv, 0x61a00c + doff, 0x); -- 1.8.1.2
[PATCH 09/21] drm: export drm_vm_open_locked
The EXYNOS DRM driver uses drm_vm_open_locked in its mmap() function, and it can be built as a loadable module, which currently fails. This exports the symbol from the DRM core to avoid ERROR: "drm_vm_open_locked" [drivers/gpu/drm/exynos/exynosdrm.ko] undefined! Signed-off-by: Arnd Bergmann Cc: David Airlie Cc: dri-devel at lists.freedesktop.org Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park --- drivers/gpu/drm/drm_vm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c index db7bd29..1d4f7c9 100644 --- a/drivers/gpu/drm/drm_vm.c +++ b/drivers/gpu/drm/drm_vm.c @@ -422,6 +422,7 @@ void drm_vm_open_locked(struct drm_device *dev, list_add(&vma_entry->head, &dev->vmalist); } } +EXPORT_SYMBOL_GPL(drm_vm_open_locked); static void drm_vm_open(struct vm_area_struct *vma) { -- 1.8.1.2
[PATCH 00/21] more arm build fixes
Hi subsystem maintainers, Here is another set of patches that resulted from build testing on linux-next. Please apply directly into your trees if you agree, or let me know if I made a mistake. I can take whatever remains through the arm-soc tree if you prefer that or I don't hear back. Arnd Arnd Bergmann (21): ARM: topology: export cpu_topology ARM: default machine descriptor for multiplatform ARM: shmobile: don't call irqchip_init unconditionally ARM: orion5x: include linux/cpu.h atm: he: use mdelay instead of large udelay constants ALSA: ali5451: use mdelay instead of large udelay constants oss/dmabuf: use dma_map_single drm/nouveau: use mdelay instead of large udelay constants drm: export drm_vm_open_locked [SCSI] nsp32: use mdelay instead of large udelay constants irqdomain: export irq_domain_add_simple irqchip: s3c24xx: add missing __init annotations iommu: tegra: print dma_addr_t using %lld cpufreq: pxa2xx: initialize variables thermal: cooling: avoid uninitialied used gcc warning OF: remove #ifdef from linux/of_platform.h X.509: do not emit any informational output USB: ehci-msm: USB_MSM_OTG needs USB_PHY USB: lpc32xx: ISP1301 needs USB_PHY USB: OMAP: ISP1301 needs USB_PHY USB: OHCI: avoid conflicting platform drivers arch/arm/Kconfig | 1 - arch/arm/configs/lpc32xx_defconfig | 1 + arch/arm/configs/msm_defconfig | 1 + arch/arm/configs/omap1_defconfig | 1 + arch/arm/kernel/devtree.c | 7 ++ arch/arm/kernel/setup.c| 11 +- arch/arm/kernel/topology.c | 1 + arch/arm/mach-orion5x/common.c | 1 + arch/arm/mach-shmobile/intc-r8a7740.c | 13 +- drivers/atm/he.c | 2 +- drivers/cpufreq/pxa2xx-cpufreq.c | 5 +- drivers/gpu/drm/drm_vm.c | 1 + drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c | 3 +- drivers/iommu/tegra-gart.c | 3 +- drivers/iommu/tegra-smmu.c | 2 +- drivers/irqchip/irq-s3c24xx.c | 4 +- drivers/scsi/nsp32.c | 2 +- drivers/thermal/cpu_cooling.c | 17 +-- drivers/usb/gadget/Kconfig | 2 + drivers/usb/host/Kconfig | 1 + drivers/usb/host/ohci-hcd.c| 136 ++--- drivers/usb/phy/Makefile | 2 +- include/linux/of_platform.h| 13 +- kernel/irq/irqdomain.c | 1 + lib/build_OID_registry | 2 - sound/oss/dmabuf.c | 3 +- sound/pci/ali5451/ali5451.c| 8 +- 27 files changed, 187 insertions(+), 57 deletions(-) -- 1.8.1.2 Cc: "James E.J. Bottomley" Cc: Benjamin Herrenschmidt Cc: David Airlie Cc: Felipe Balbi Cc: Grant Likely Cc: Greg Kroah-Hartman Cc: Inki Dae Cc: Jason Cooper Cc: Joerg Roedel Cc: Nicolas Pitre Cc: Rafael J. Wysocki Cc: Rob Herring Cc: Russell King Cc: Simon Horman Cc: Thomas Gleixner Cc: Viresh Kumar Cc: Will Deacon Cc: alsa-devel at alsa-project.org Cc: dri-devel at lists.freedesktop.org Cc: linux-atm-general at lists.sourceforge.net Cc: linux-scsi at vger.kernel.org Cc: linux-usb at vger.kernel.org Cc: netdev at vger.kernel.org
[PATCHv4 1/2] ppc64: perform proper max_bus_speed detection
On 04/24/2013 08:48 PM, Tony Breeds wrote: > On Wed, Apr 24, 2013 at 07:54:49PM -0300, lucaskt at linux.vnet.ibm.com wrote: >> From: Lucas Kannebley Tavares >> >> On pseries machines the detection for max_bus_speed should be done >> through an OpenFirmware property. This patch adds a function to perform >> this detection and a hook to perform dynamic adding of the function only for >> pseries. This is done by overwriting the weak >> pcibios_root_bridge_prepare function which is called by >> pci_create_root_bus(). >> >> Signed-off-by: Lucas Kannebley Tavares >> --- >> arch/powerpc/include/asm/machdep.h | 2 ++ >> arch/powerpc/kernel/pci-common.c | 8 + >> arch/powerpc/platforms/pseries/pci.c | 51 >> >> arch/powerpc/platforms/pseries/pseries.h | 4 +++ >> arch/powerpc/platforms/pseries/setup.c | 2 ++ >> 5 files changed, 67 insertions(+) >> >> diff --git a/arch/powerpc/include/asm/machdep.h >> b/arch/powerpc/include/asm/machdep.h >> index 3d6b410..8f558bf 100644 >> --- a/arch/powerpc/include/asm/machdep.h >> +++ b/arch/powerpc/include/asm/machdep.h >> @@ -107,6 +107,8 @@ struct machdep_calls { >> void(*pcibios_fixup)(void); >> int (*pci_probe_mode)(struct pci_bus *); >> void(*pci_irq_fixup)(struct pci_dev *dev); >> +int (*pcibios_root_bridge_prepare)(struct pci_host_bridge >> +*bridge); >> >> /* To setup PHBs when using automatic OF platform driver for PCI */ >> int (*pci_setup_phb)(struct pci_controller *host); >> diff --git a/arch/powerpc/kernel/pci-common.c >> b/arch/powerpc/kernel/pci-common.c >> index fa12ae4..80986cf 100644 >> --- a/arch/powerpc/kernel/pci-common.c >> +++ b/arch/powerpc/kernel/pci-common.c >> @@ -844,6 +844,14 @@ int pci_proc_domain(struct pci_bus *bus) >> return 1; >> } >> >> +int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) >> +{ >> +if (ppc_md.pcibios_root_bridge_prepare) >> +return ppc_md.pcibios_root_bridge_prepare(bridge); >> + >> +return 0; >> +} >> + >> /* This header fixup will do the resource fixup for all devices as they are >>* probed, but not for bridge ranges >>*/ >> diff --git a/arch/powerpc/platforms/pseries/pci.c >> b/arch/powerpc/platforms/pseries/pci.c >> index 0b580f4..7f9c956 100644 >> --- a/arch/powerpc/platforms/pseries/pci.c >> +++ b/arch/powerpc/platforms/pseries/pci.c >> @@ -108,3 +108,54 @@ static void fixup_winbond_82c105(struct pci_dev* dev) >> } >> DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_WINBOND, >> PCI_DEVICE_ID_WINBOND_82C105, >> fixup_winbond_82c105); >> + >> +int pseries_root_bridge_prepare(struct pci_host_bridge *bridge) >> +{ >> +struct device_node *dn, *pdn; >> +struct pci_bus *bus; >> +const uint32_t *pcie_link_speed_stats; >> + >> +bus = bridge->bus; >> + >> +dn = pcibios_get_phb_of_node(bus); >> +if (!dn) >> +return 0; >> + >> +for (pdn = dn; pdn != NULL; pdn = pdn->parent) { >> +pcie_link_speed_stats = (const uint32_t *) of_get_property(dn, >> +"ibm,pcie-link-speed-stats", NULL); >> +if (pcie_link_speed_stats) >> +break; >> +} > > Please use the helpers in include/linux/of.h rather than open coding > this. > > Yours Tony Hi Tony, This is what I can find as an equivalent code: for (pdn = dn; pdn != NULL; pdn = of_get_next_parent(pdn)) { pcie_link_speed_stats = (const uint32_t *) of_get_property(dn, "ibm,pcie-link-speed-stats", NULL); if (pcie_link_speed_stats) break; } is this your suggestion, or was it another approach that will have the same result? Thanks, -- Lucas Kannebley Tavares Software Engineer IBM Linux Technology Center
[PATCH 11/21] drm/tilcdc: use only a single module device table
On Tue, Apr 23, 2013 at 12:30 PM, Arnd Bergmann wrote: > The tilcdc driver fails to be built as a module because of extraneous > MODULE_DEVICE_TABLE entries: > > drivers/gpu/drm/tilcdc/tilcdc_slave.o:(.data+0x54): multiple definition of > `__mod_of_device_table' > drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here > drivers/gpu/drm/tilcdc/tilcdc_panel.o:(.data+0x54): multiple definition of > `__mod_of_device_table' > drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here > drivers/gpu/drm/tilcdc/tilcdc_drv.o:(.data+0x184): multiple definition of > `__mod_of_device_table' > drivers/gpu/drm/tilcdc/tilcdc_tfp410.o:(.data+0x54): first defined here > > Since the entire point of these entries is to make the module autoload > when one of the devices is present, it's enough to keep the one entry > for "ti,am33xx-tilcdc", which should always be there if any of the > others are. Thanks Arnd Acked-By: Rob Clark > Cc: Rob Clark > Cc: Dave Airlie > Cc: dri-devel at lists.freedesktop.org > Signed-off-by: Arnd Bergmann > --- > drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - > drivers/gpu/drm/tilcdc/tilcdc_slave.c | 1 - > drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 1 - > 3 files changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c > b/drivers/gpu/drm/tilcdc/tilcdc_panel.c > index 580b74e..eb99f42 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c > @@ -413,7 +413,6 @@ static struct of_device_id panel_of_match[] = { > { .compatible = "ti,tilcdc,panel", }, > { }, > }; > -MODULE_DEVICE_TABLE(of, panel_of_match); > > struct platform_driver panel_driver = { > .probe = panel_probe, > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_slave.c > b/drivers/gpu/drm/tilcdc/tilcdc_slave.c > index 568dc1c..db1d2fc 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_slave.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_slave.c > @@ -353,7 +353,6 @@ static struct of_device_id slave_of_match[] = { > { .compatible = "ti,tilcdc,slave", }, > { }, > }; > -MODULE_DEVICE_TABLE(of, slave_of_match); > > struct platform_driver slave_driver = { > .probe = slave_probe, > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c > b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c > index 58d487b..a36788f 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_tfp410.c > @@ -396,7 +396,6 @@ static struct of_device_id tfp410_of_match[] = { > { .compatible = "ti,tilcdc,tfp410", }, > { }, > }; > -MODULE_DEVICE_TABLE(of, tfp410_of_match); > > struct platform_driver tfp410_driver = { > .probe = tfp410_probe, > -- > 1.8.1.2 >
[PATCH 3/3] drm: Kill user_modes list and the associated ioctls
On Thu, Apr 25, 2013 at 7:09 PM, wrote: > From: Ville Syrj?l? > > There is no way to use modes added to the user_modes list. We never > look at the contents of said list in the kernel, and the only operations > userspace can do are attach and detach. So the only "benefit" of this > interface is wasting kernel memory. > > Fortunately it seems no real user space application ever used these > ioctls. So just kill them. > > Also remove the prototypes for the non-existing drm_mode_addmode_ioctl() > and drm_mode_rmmode_ioctl() functions. > > Signed-off-by: Ville Syrj?l? I've added the drm_nop ioctl function for such cases, that way even when userspace uses this we'll keep on lying instead of potentially upsetting something with an failed ioctl call. Also helps to document the holes in the ioctl table. -Daniel > --- > drivers/gpu/drm/drm_crtc.c | 190 > - > drivers/gpu/drm/drm_drv.c | 2 - > include/drm/drm_crtc.h | 15 > include/uapi/drm/drm.h | 4 +- > 4 files changed, 2 insertions(+), 209 deletions(-) > > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c > index 287cd82..3a8f7e6d 100644 > --- a/drivers/gpu/drm/drm_crtc.c > +++ b/drivers/gpu/drm/drm_crtc.c > @@ -703,7 +703,6 @@ int drm_connector_init(struct drm_device *dev, > connector->connector_type = connector_type; > connector->connector_type_id = > ++drm_connector_enum_list[connector_type].count; /* TODO */ > - INIT_LIST_HEAD(&connector->user_modes); > INIT_LIST_HEAD(&connector->probed_modes); > INIT_LIST_HEAD(&connector->modes); > connector->edid_blob_ptr = NULL; > @@ -744,9 +743,6 @@ void drm_connector_cleanup(struct drm_connector > *connector) > list_for_each_entry_safe(mode, t, &connector->modes, head) > drm_mode_remove(connector, mode); > > - list_for_each_entry_safe(mode, t, &connector->user_modes, head) > - drm_mode_remove(connector, mode); > - > drm_mode_object_put(dev, &connector->base); > list_del(&connector->head); > dev->mode_config.num_connector--; > @@ -2613,192 +2609,6 @@ void drm_fb_release(struct drm_file *priv) > mutex_unlock(&priv->fbs_lock); > } > > -/** > - * drm_mode_attachmode - add a mode to the user mode list > - * @dev: DRM device > - * @connector: connector to add the mode to > - * @mode: mode to add > - * > - * Add @mode to @connector's user mode list. > - */ > -static void drm_mode_attachmode(struct drm_device *dev, > - struct drm_connector *connector, > - struct drm_display_mode *mode) > -{ > - list_add_tail(&mode->head, &connector->user_modes); > -} > - > -int drm_mode_attachmode_crtc(struct drm_device *dev, struct drm_crtc *crtc, > -const struct drm_display_mode *mode) > -{ > - struct drm_connector *connector; > - int ret = 0; > - struct drm_display_mode *dup_mode, *next; > - LIST_HEAD(list); > - > - list_for_each_entry(connector, &dev->mode_config.connector_list, > head) { > - if (!connector->encoder) > - continue; > - if (connector->encoder->crtc == crtc) { > - dup_mode = drm_mode_duplicate(dev, mode); > - if (!dup_mode) { > - ret = -ENOMEM; > - goto out; > - } > - list_add_tail(&dup_mode->head, &list); > - } > - } > - > - list_for_each_entry(connector, &dev->mode_config.connector_list, > head) { > - if (!connector->encoder) > - continue; > - if (connector->encoder->crtc == crtc) > - list_move_tail(list.next, &connector->user_modes); > - } > - > - WARN_ON(!list_empty(&list)); > - > - out: > - list_for_each_entry_safe(dup_mode, next, &list, head) > - drm_mode_destroy(dev, dup_mode); > - > - return ret; > -} > -EXPORT_SYMBOL(drm_mode_attachmode_crtc); > - > -static int drm_mode_detachmode(struct drm_device *dev, > - struct drm_connector *connector, > - struct drm_display_mode *mode) > -{ > - int found = 0; > - int ret = 0; > - struct drm_display_mode *match_mode, *t; > - > - list_for_each_entry_safe(match_mode, t, &connector->user_modes, head) > { > - if (drm_mode_equal(match_mode, mode)) { > - list_del(&match_mode->head); > - drm_mode_destroy(dev, match_mode); > - found = 1; > - break; > - } > - } > - > - if (!found) > - ret = -EINVAL; > - > - return ret; > -} > - > -int drm_mode_detachmode_crtc(struct drm_device *dev, s
[PATCH 1/2] drm/radeon: add some new SI PCI ids
From: Alex Deucher Signed-off-by: Alex Deucher Cc: stable at vger.kernel.org --- include/drm/drm_pciids.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 918e8fe..52300c7 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h @@ -240,6 +240,7 @@ {0x1002, 0x6819, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PITCAIRN|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6821, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6822, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6823, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6824, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ @@ -247,11 +248,13 @@ {0x1002, 0x6827, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x682A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x682B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x682D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x682F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6830, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6831, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x6835, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6837, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6838, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ {0x1002, 0x6839, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_VERDE|RADEON_NEW_MEMMAP}, \ -- 1.7.7.5
[PATCH 2/2] drm/radeon: add new richland pci ids
From: Alex Deucher Signed-off-by: Alex Deucher Cc: stable at vger.kernel.org --- drivers/gpu/drm/radeon/ni.c |6 -- include/drm/drm_pciids.h|2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 7436b91..7969c0c 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c @@ -749,7 +749,8 @@ static void cayman_gpu_init(struct radeon_device *rdev) (rdev->pdev->device == 0x990F) || (rdev->pdev->device == 0x9910) || (rdev->pdev->device == 0x9917) || - (rdev->pdev->device == 0x)) { + (rdev->pdev->device == 0x) || + (rdev->pdev->device == 0x999C)) { rdev->config.cayman.max_simds_per_se = 6; rdev->config.cayman.max_backends_per_se = 2; } else if ((rdev->pdev->device == 0x9903) || @@ -758,7 +759,8 @@ static void cayman_gpu_init(struct radeon_device *rdev) (rdev->pdev->device == 0x990D) || (rdev->pdev->device == 0x990E) || (rdev->pdev->device == 0x9913) || - (rdev->pdev->device == 0x9918)) { + (rdev->pdev->device == 0x9918) || + (rdev->pdev->device == 0x999D)) { rdev->config.cayman.max_simds_per_se = 4; rdev->config.cayman.max_backends_per_se = 2; } else if ((rdev->pdev->device == 0x9919) || diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h index 52300c7..c2af598 100644 --- a/include/drm/drm_pciids.h +++ b/include/drm/drm_pciids.h @@ -606,6 +606,8 @@ {0x1002, 0x, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ {0x1002, 0x999A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ {0x1002, 0x999B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x999C, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ + {0x1002, 0x999D, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ {0x1002, 0x99A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ {0x1002, 0x99A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ {0x1002, 0x99A4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_ARUBA|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ -- 1.7.7.5
[PATCH] drm/exynos: Don't blend mixer layer 0
This patch disables blending the mixer's layer 0 onto the background (solid color). It doesn't make sense to blend this layer by default, and causes color distortion if the layer is used for arbitrary content. Signed-off-by: Sean Paul --- drivers/gpu/drm/exynos/exynos_mixer.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c index f08e251..ec3e376 100644 --- a/drivers/gpu/drm/exynos/exynos_mixer.c +++ b/drivers/gpu/drm/exynos/exynos_mixer.c @@ -643,12 +643,14 @@ static void mixer_win_reset(struct mixer_context *ctx) /* setting graphical layers */ val = MXR_GRP_CFG_COLOR_KEY_DISABLE; /* no blank key */ val |= MXR_GRP_CFG_WIN_BLEND_EN; - val |= MXR_GRP_CFG_BLEND_PRE_MUL; - val |= MXR_GRP_CFG_PIXEL_BLEND_EN; val |= MXR_GRP_CFG_ALPHA_VAL(0xff); /* non-transparent alpha */ - /* the same configuration for both layers */ + /* Don't blend layer 0 onto the mixer background */ mixer_reg_write(res, MXR_GRAPHIC_CFG(0), val); + + /* Blend layer 1 into layer 0 */ + val |= MXR_GRP_CFG_BLEND_PRE_MUL; + val |= MXR_GRP_CFG_PIXEL_BLEND_EN; mixer_reg_write(res, MXR_GRAPHIC_CFG(1), val); /* setting video layers */ -- 1.7.7.3
[Bug 63933] New: Error in r300_set_framebuffer_state if use Dual-Head setup
https://bugs.freedesktop.org/show_bug.cgi?id=63933 Priority: medium Bug ID: 63933 Assignee: dri-devel at lists.freedesktop.org Summary: Error in r300_set_framebuffer_state if use Dual-Head setup Severity: normal Classification: Unclassified OS: Linux (All) Reporter: victoraur.santos at gmail.com Hardware: x86-64 (AMD64) Status: NEW Version: 9.1 Component: Drivers/DRI/r300 Product: Mesa Created attachment 78488 --> https://bugs.freedesktop.org/attachment.cgi?id=78488&action=edit Full log using compiz as gl-based wm If try to start any WM that uses GL(Compiz, Gnome-shell, etc...) i get screen completely stained and a lot of r300 error in .xsession-errors Attached full log (using compiz) Detail: if only one monitor is connected this error/bug doesn't occur and WM GL-based start correctly. -- 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/20130425/a44020ed/attachment.html>
[GIT PULL] gma500-fixes
Hi Dave Two fixes for gma500. First one from Anisse allows us to handle ASLE irqs even when BIOS doesn't trigger a pipe event irq. The second one allows dual head setups to have a big shared framebuffer. Thanks Patrik The following changes since commit 1611f8457768716ba2397e0cdcc92c863cf9b58b: drm/gma500: Add debugging info to psb_gtt_restore() (2013-04-15 23:44:56 +0200) are available in the git repository at: https://www.github.com/patjak/drm-gma500 gma500-fixes for you to fetch changes up to cbbd379aa43890f36da934f5af619d2fb8ec3d87: drm/gma500: Increase max resolution for mode setting (2013-04-25 22:23:36 +0200) Anisse Astier (1): drm/gma500: fix backlight hotkeys behaviour on netbooks Patrik Jakobsson (1): drm/gma500: Increase max resolution for mode setting drivers/gpu/drm/gma500/framebuffer.c | 4 ++-- drivers/gpu/drm/gma500/psb_irq.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
[Bug 63933] Error in r300_set_framebuffer_state if use Dual-Head setup
https://bugs.freedesktop.org/show_bug.cgi?id=63933 Alex Deucher changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |NOTABUG --- Comment #1 from Alex Deucher --- As per your log, you've exceeded the hw limits of the 3D engine on your chip (max texture size of 2048x2048). /usr/bin/compiz (opengl) - Warn: Bug in window 0x1600016 (identifying as desktop_window) /usr/bin/compiz (opengl) - Warn: This window tried to create an absurdly large window 2646 x 1024 /usr/bin/compiz (opengl) - Warn: Unforunately, that's not supported on your hardware, because you have a maximum texture size of 2048 /usr/bin/compiz (opengl) - Warn: you should probably file a bug against that application /usr/bin/compiz (opengl) - Warn: for now, we're going to hide tht window so that it doesn't break your desktop -- 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/20130425/2f376ccd/attachment.html>
[PATCH] radeon: add bo tracking debugfs
From: Jerome Glisse This is to allow debugging of userspace program not freeing buffer after, which is basicly a memory leak. This print the list of all gem object along with their size and placement (VRAM,GTT,CPU) and with the pid of the task that created them. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h| 5 +++- drivers/gpu/drm/radeon/radeon_device.c | 5 drivers/gpu/drm/radeon/radeon_gem.c| 50 ++ 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 18904fb..bd28ee6 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h @@ -358,7 +358,8 @@ struct radeon_bo { struct radeon_device*rdev; struct drm_gem_object gem_base; - struct ttm_bo_kmap_obj dma_buf_vmap; + struct ttm_bo_kmap_obj dma_buf_vmap; + pid_t pid; }; #define gem_to_radeon_bo(gobj) container_of((gobj), struct radeon_bo, gem_base) @@ -372,6 +373,8 @@ struct radeon_bo_list { u32 tiling_flags; }; +int radeon_gem_debugfs_init(struct radeon_device *rdev); + /* sub-allocation manager, it has to be protected by another lock. * By conception this is an helper for other part of the driver * like the indirect buffer or semaphore, which both have their diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 62d0ba3..76166ae 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -1142,6 +1142,11 @@ int radeon_device_init(struct radeon_device *rdev, if (r) DRM_ERROR("ib ring test failed (%d).\n", r); + r = radeon_gem_debugfs_init(rdev); + if (r) { + DRM_ERROR("registering gem debugfs failed (%d).\n", r); + } + if (rdev->flags & RADEON_IS_AGP && !rdev->accel_working) { /* Acceleration not working on AGP card try again * with fallback to PCI or PCIE GART diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index fe5c1f6..87f8c52 100644 --- a/drivers/gpu/drm/radeon/radeon_gem.c +++ b/drivers/gpu/drm/radeon/radeon_gem.c @@ -84,6 +84,7 @@ retry: return r; } *obj = &robj->gem_base; + robj->pid = task_pid_nr(current); mutex_lock(&rdev->gem.mutex); list_add_tail(&robj->list, &rdev->gem.objects); @@ -575,3 +576,52 @@ int radeon_mode_dumb_destroy(struct drm_file *file_priv, { return drm_gem_handle_delete(file_priv, handle); } + +#if defined(CONFIG_DEBUG_FS) +static int radeon_debugfs_gem_info(struct seq_file *m, void *data) +{ + struct drm_info_node *node = (struct drm_info_node *)m->private; + struct drm_device *dev = node->minor->dev; + struct radeon_device *rdev = dev->dev_private; + struct radeon_bo *rbo; + unsigned i = 0; + + mutex_lock(&rdev->gem.mutex); + list_for_each_entry(rbo, &rdev->gem.objects, list) { + unsigned domain; + const char *placement; + + domain = radeon_mem_type_to_domain(rbo->tbo.mem.mem_type); + switch (domain) { + case RADEON_GEM_DOMAIN_VRAM: + placement = "VRAM"; + break; + case RADEON_GEM_DOMAIN_GTT: + placement = " GTT"; + break; + case RADEON_GEM_DOMAIN_CPU: + default: + placement = " CPU"; + break; + } + seq_printf(m, "bo[0x%08x] %8dkB %8dMB %s pid %8ld\n", + i, radeon_bo_size(rbo) >> 10, radeon_bo_size(rbo) >> 20, + placement, (unsigned long)rbo->pid); + i++; + } + mutex_unlock(&rdev->gem.mutex); + return 0; +} + +static struct drm_info_list radeon_debugfs_gem_list[] = { + {"radeon_gem_info", &radeon_debugfs_gem_info, 0, NULL}, +}; +#endif + +int radeon_gem_debugfs_init(struct radeon_device *rdev) +{ +#if defined(CONFIG_DEBUG_FS) + return radeon_debugfs_add_files(rdev, radeon_debugfs_gem_list, 1); +#endif + return 0; +} -- 1.8.2.1
[PATCH] radeon: add bo tracking debugfs
On Thu, Apr 25, 2013 at 10:29 PM, wrote: > From: Jerome Glisse > > This is to allow debugging of userspace program not freeing buffer > after, which is basicly a memory leak. This print the list of all > gem object along with their size and placement (VRAM,GTT,CPU) and > with the pid of the task that created them. > > Signed-off-by: Jerome Glisse Looks good to me. Unless there are any objections, I'll pull it in for 3.10 Alex > --- > drivers/gpu/drm/radeon/radeon.h| 5 +++- > drivers/gpu/drm/radeon/radeon_device.c | 5 > drivers/gpu/drm/radeon/radeon_gem.c| 50 > ++ > 3 files changed, 59 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h > index 18904fb..bd28ee6 100644 > --- a/drivers/gpu/drm/radeon/radeon.h > +++ b/drivers/gpu/drm/radeon/radeon.h > @@ -358,7 +358,8 @@ struct radeon_bo { > struct radeon_device*rdev; > struct drm_gem_object gem_base; > > - struct ttm_bo_kmap_obj dma_buf_vmap; > + struct ttm_bo_kmap_obj dma_buf_vmap; > + pid_t pid; > }; > #define gem_to_radeon_bo(gobj) container_of((gobj), struct radeon_bo, > gem_base) > > @@ -372,6 +373,8 @@ struct radeon_bo_list { > u32 tiling_flags; > }; > > +int radeon_gem_debugfs_init(struct radeon_device *rdev); > + > /* sub-allocation manager, it has to be protected by another lock. > * By conception this is an helper for other part of the driver > * like the indirect buffer or semaphore, which both have their > diff --git a/drivers/gpu/drm/radeon/radeon_device.c > b/drivers/gpu/drm/radeon/radeon_device.c > index 62d0ba3..76166ae 100644 > --- a/drivers/gpu/drm/radeon/radeon_device.c > +++ b/drivers/gpu/drm/radeon/radeon_device.c > @@ -1142,6 +1142,11 @@ int radeon_device_init(struct radeon_device *rdev, > if (r) > DRM_ERROR("ib ring test failed (%d).\n", r); > > + r = radeon_gem_debugfs_init(rdev); > + if (r) { > + DRM_ERROR("registering gem debugfs failed (%d).\n", r); > + } > + > if (rdev->flags & RADEON_IS_AGP && !rdev->accel_working) { > /* Acceleration not working on AGP card try again > * with fallback to PCI or PCIE GART > diff --git a/drivers/gpu/drm/radeon/radeon_gem.c > b/drivers/gpu/drm/radeon/radeon_gem.c > index fe5c1f6..87f8c52 100644 > --- a/drivers/gpu/drm/radeon/radeon_gem.c > +++ b/drivers/gpu/drm/radeon/radeon_gem.c > @@ -84,6 +84,7 @@ retry: > return r; > } > *obj = &robj->gem_base; > + robj->pid = task_pid_nr(current); > > mutex_lock(&rdev->gem.mutex); > list_add_tail(&robj->list, &rdev->gem.objects); > @@ -575,3 +576,52 @@ int radeon_mode_dumb_destroy(struct drm_file *file_priv, > { > return drm_gem_handle_delete(file_priv, handle); > } > + > +#if defined(CONFIG_DEBUG_FS) > +static int radeon_debugfs_gem_info(struct seq_file *m, void *data) > +{ > + struct drm_info_node *node = (struct drm_info_node *)m->private; > + struct drm_device *dev = node->minor->dev; > + struct radeon_device *rdev = dev->dev_private; > + struct radeon_bo *rbo; > + unsigned i = 0; > + > + mutex_lock(&rdev->gem.mutex); > + list_for_each_entry(rbo, &rdev->gem.objects, list) { > + unsigned domain; > + const char *placement; > + > + domain = radeon_mem_type_to_domain(rbo->tbo.mem.mem_type); > + switch (domain) { > + case RADEON_GEM_DOMAIN_VRAM: > + placement = "VRAM"; > + break; > + case RADEON_GEM_DOMAIN_GTT: > + placement = " GTT"; > + break; > + case RADEON_GEM_DOMAIN_CPU: > + default: > + placement = " CPU"; > + break; > + } > + seq_printf(m, "bo[0x%08x] %8dkB %8dMB %s pid %8ld\n", > + i, radeon_bo_size(rbo) >> 10, radeon_bo_size(rbo) > >> 20, > + placement, (unsigned long)rbo->pid); > + i++; > + } > + mutex_unlock(&rdev->gem.mutex); > + return 0; > +} > + > +static struct drm_info_list radeon_debugfs_gem_list[] = { > + {"radeon_gem_info", &radeon_debugfs_gem_info, 0, NULL}, > +}; > +#endif > + > +int radeon_gem_debugfs_init(struct radeon_device *rdev) > +{ > +#if defined(CONFIG_DEBUG_FS) > + return radeon_debugfs_add_files(rdev, radeon_debugfs_gem_list, 1); > +#endif > + return 0; > +} > -- > 1.8.2.1 > > ___ > dri-devel mailing list > dri-devel at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel
[PATCH] drm: shmobile: Use devm_* managed functions
This simplifies cleanup paths and fixes a probe time crash in the error path when trying to cleanup mode setting before it was initialized. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 28 +--- drivers/gpu/drm/shmobile/shmob_drm_plane.c | 7 +-- 2 files changed, 10 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c index f6e0b53..29d15e3 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c @@ -90,7 +90,7 @@ static int shmob_drm_setup_clocks(struct shmob_drm_device *sdev, return -EINVAL; } - clk = clk_get(sdev->dev, clkname); + clk = devm_clk_get(sdev->dev, clkname); if (IS_ERR(clk)) { dev_err(sdev->dev, "cannot get dot clock %s\n", clkname); return PTR_ERR(clk); @@ -106,21 +106,12 @@ static int shmob_drm_setup_clocks(struct shmob_drm_device *sdev, static int shmob_drm_unload(struct drm_device *dev) { - struct shmob_drm_device *sdev = dev->dev_private; - drm_kms_helper_poll_fini(dev); drm_mode_config_cleanup(dev); drm_vblank_cleanup(dev); drm_irq_uninstall(dev); - if (sdev->clock) - clk_put(sdev->clock); - - if (sdev->mmio) - iounmap(sdev->mmio); - dev->dev_private = NULL; - kfree(sdev); return 0; } @@ -139,7 +130,7 @@ static int shmob_drm_load(struct drm_device *dev, unsigned long flags) return -EINVAL; } - sdev = kzalloc(sizeof(*sdev), GFP_KERNEL); + sdev = devm_kzalloc(&pdev->dev, sizeof(*sdev), GFP_KERNEL); if (sdev == NULL) { dev_err(dev->dev, "failed to allocate private data\n"); return -ENOMEM; @@ -156,29 +147,28 @@ static int shmob_drm_load(struct drm_device *dev, unsigned long flags) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res == NULL) { dev_err(&pdev->dev, "failed to get memory resource\n"); - ret = -EINVAL; - goto done; + return -EINVAL; } - sdev->mmio = ioremap_nocache(res->start, resource_size(res)); + sdev->mmio = devm_ioremap_nocache(&pdev->dev, res->start, + resource_size(res)); if (sdev->mmio == NULL) { dev_err(&pdev->dev, "failed to remap memory resource\n"); - ret = -ENOMEM; - goto done; + return -ENOMEM; } ret = shmob_drm_setup_clocks(sdev, pdata->clk_source); if (ret < 0) - goto done; + return ret; ret = shmob_drm_init_interface(sdev); if (ret < 0) - goto done; + return ret; ret = shmob_drm_modeset_init(sdev); if (ret < 0) { dev_err(&pdev->dev, "failed to initialize mode setting\n"); - goto done; + return ret; } for (i = 0; i < 4; ++i) { diff --git a/drivers/gpu/drm/shmobile/shmob_drm_plane.c b/drivers/gpu/drm/shmobile/shmob_drm_plane.c index e1eb899..6898f6f 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_plane.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_plane.c @@ -221,11 +221,8 @@ static int shmob_drm_plane_disable(struct drm_plane *plane) static void shmob_drm_plane_destroy(struct drm_plane *plane) { - struct shmob_drm_plane *splane = to_shmob_plane(plane); - shmob_drm_plane_disable(plane); drm_plane_cleanup(plane); - kfree(splane); } static const struct drm_plane_funcs shmob_drm_plane_funcs = { @@ -251,7 +248,7 @@ int shmob_drm_plane_create(struct shmob_drm_device *sdev, unsigned int index) struct shmob_drm_plane *splane; int ret; - splane = kzalloc(sizeof(*splane), GFP_KERNEL); + splane = devm_kzalloc(sdev->dev, sizeof(*splane), GFP_KERNEL); if (splane == NULL) return -ENOMEM; @@ -261,8 +258,6 @@ int shmob_drm_plane_create(struct shmob_drm_device *sdev, unsigned int index) ret = drm_plane_init(sdev->ddev, &splane->plane, 1, &shmob_drm_plane_funcs, formats, ARRAY_SIZE(formats), false); - if (ret < 0) - kfree(splane); return ret; } -- Regards, Laurent Pinchart
[PATCH Resend] drm/exynos: Select VIDEOMODE_HELPERS for FIMD
FIMD also requires video mode helper APIs. Without this patch we get the following build error: drivers/gpu/drm/exynos/exynos_drm_fimd.c:895: undefined reference to `of_get_fb_videomode' make: *** [vmlinux] Error 1 Signed-off-by: Sachin Kamat --- drivers/gpu/drm/exynos/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig index 406f32a..8edca41 100644 --- a/drivers/gpu/drm/exynos/Kconfig +++ b/drivers/gpu/drm/exynos/Kconfig @@ -27,6 +27,7 @@ config DRM_EXYNOS_FIMD depends on OF && DRM_EXYNOS && !FB_S3C && !ARCH_MULTIPLATFORM select OF_VIDEOMODE select FB_MODE_HELPERS + select VIDEOMODE_HELPERS help Choose this option if you want to use Exynos FIMD for DRM. -- 1.7.9.5