* [PATCH 0/3] drm/omap: patches for v4.6 part 3
@ 2016-03-03 14:01 Tomi Valkeinen
2016-03-03 14:01 ` [PATCH 1/3] drm/omap: remove -Werror from Makefile Tomi Valkeinen
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Tomi Valkeinen @ 2016-03-03 14:01 UTC (permalink / raw)
To: dri-devel, Laurent Pinchart; +Cc: Tomi Valkeinen
Hi,
A few more patches for omapdrm for 4.6. These are based on the "drm/omap:
patches for v4.6 part 2" series sent earlier.
Tomi
Laurent Pinchart (1):
drm/omap: gem: Fix omap_gem_new() error path
Tomi Valkeinen (2):
drm/omap: remove -Werror from Makefile
drm/omap: no need to select OMAP2_DSS
drivers/gpu/drm/omapdrm/Kconfig | 1 -
drivers/gpu/drm/omapdrm/Makefile | 2 +-
drivers/gpu/drm/omapdrm/omap_gem.c | 34 ++++++++++++++++++----------------
3 files changed, 19 insertions(+), 18 deletions(-)
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/3] drm/omap: remove -Werror from Makefile 2016-03-03 14:01 [PATCH 0/3] drm/omap: patches for v4.6 part 3 Tomi Valkeinen @ 2016-03-03 14:01 ` Tomi Valkeinen 2016-03-03 18:44 ` Laurent Pinchart 2016-03-03 14:01 ` [PATCH 2/3] drm/omap: gem: Fix omap_gem_new() error path Tomi Valkeinen 2016-03-03 14:01 ` [PATCH 3/3] drm/omap: no need to select OMAP2_DSS Tomi Valkeinen 2 siblings, 1 reply; 8+ messages in thread From: Tomi Valkeinen @ 2016-03-03 14:01 UTC (permalink / raw) To: dri-devel, Laurent Pinchart; +Cc: Tomi Valkeinen Having -Werror in the omapdrm Makefile makes development and debugging a PITA. Let's remove it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- drivers/gpu/drm/omapdrm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/Makefile b/drivers/gpu/drm/omapdrm/Makefile index fe4c2228bc18..48b7b750c05c 100644 --- a/drivers/gpu/drm/omapdrm/Makefile +++ b/drivers/gpu/drm/omapdrm/Makefile @@ -6,7 +6,7 @@ obj-y += dss/ obj-y += displays/ -ccflags-y := -Iinclude/drm -Werror +ccflags-y := -Iinclude/drm omapdrm-y := omap_drv.o \ omap_irq.o \ omap_debugfs.o \ -- 2.5.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] drm/omap: remove -Werror from Makefile 2016-03-03 14:01 ` [PATCH 1/3] drm/omap: remove -Werror from Makefile Tomi Valkeinen @ 2016-03-03 18:44 ` Laurent Pinchart 2016-03-03 18:54 ` Tomi Valkeinen 0 siblings, 1 reply; 8+ messages in thread From: Laurent Pinchart @ 2016-03-03 18:44 UTC (permalink / raw) To: Tomi Valkeinen; +Cc: dri-devel Hi Tomi, Thank you for the patch. On Thursday 03 March 2016 16:01:16 Tomi Valkeinen wrote: > Having -Werror in the omapdrm Makefile makes development and debugging a > PITA. Let's remove it. Well, shouldn't we target having no warning ? :-) > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > --- > drivers/gpu/drm/omapdrm/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/omapdrm/Makefile > b/drivers/gpu/drm/omapdrm/Makefile index fe4c2228bc18..48b7b750c05c 100644 > --- a/drivers/gpu/drm/omapdrm/Makefile > +++ b/drivers/gpu/drm/omapdrm/Makefile > @@ -6,7 +6,7 @@ > obj-y += dss/ > obj-y += displays/ > > -ccflags-y := -Iinclude/drm -Werror > +ccflags-y := -Iinclude/drm > omapdrm-y := omap_drv.o \ > omap_irq.o \ > omap_debugfs.o \ -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] drm/omap: remove -Werror from Makefile 2016-03-03 18:44 ` Laurent Pinchart @ 2016-03-03 18:54 ` Tomi Valkeinen 2016-03-06 15:22 ` Laurent Pinchart 0 siblings, 1 reply; 8+ messages in thread From: Tomi Valkeinen @ 2016-03-03 18:54 UTC (permalink / raw) To: Laurent Pinchart; +Cc: dri-devel [-- Attachment #1.1.1: Type: text/plain, Size: 812 bytes --] On 03/03/16 20:44, Laurent Pinchart wrote: > Hi Tomi, > > Thank you for the patch. > > On Thursday 03 March 2016 16:01:16 Tomi Valkeinen wrote: >> Having -Werror in the omapdrm Makefile makes development and debugging a >> PITA. Let's remove it. > > Well, shouldn't we target having no warning ? :-) Yes, but we don't need to make errors of warnings to do that. I'm just too tired of trying to avoid warnings when doing new development or debugging or testing something. Too often I have wanted to comment out a line to test something, only to find out I need to comment out lots of other things too, just to get rid of "unused variable" warning. Or developing a new feature, knowing it's not ready but want to test it anyway, but even a single warning stops compilation. Tomi [-- Attachment #1.2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] [-- Attachment #2: Type: text/plain, Size: 160 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] drm/omap: remove -Werror from Makefile 2016-03-03 18:54 ` Tomi Valkeinen @ 2016-03-06 15:22 ` Laurent Pinchart 0 siblings, 0 replies; 8+ messages in thread From: Laurent Pinchart @ 2016-03-06 15:22 UTC (permalink / raw) To: Tomi Valkeinen; +Cc: dri-devel Hi Tomi, On Thursday 03 March 2016 20:54:27 Tomi Valkeinen wrote: > On 03/03/16 20:44, Laurent Pinchart wrote: > > On Thursday 03 March 2016 16:01:16 Tomi Valkeinen wrote: > >> Having -Werror in the omapdrm Makefile makes development and debugging a > >> PITA. Let's remove it. > > > > Well, shouldn't we target having no warning ? :-) > > Yes, but we don't need to make errors of warnings to do that. > > I'm just too tired of trying to avoid warnings when doing new > development or debugging or testing something. > > Too often I have wanted to comment out a line to test something, only to > find out I need to comment out lots of other things too, just to get rid > of "unused variable" warning. > > Or developing a new feature, knowing it's not ready but want to test it > anyway, but even a single warning stops compilation. Fair enough. It could still be interesting to treat warnings as errors by default, but not specifically for the omapdrm driver, so I'm fine with this patch. Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] drm/omap: gem: Fix omap_gem_new() error path 2016-03-03 14:01 [PATCH 0/3] drm/omap: patches for v4.6 part 3 Tomi Valkeinen 2016-03-03 14:01 ` [PATCH 1/3] drm/omap: remove -Werror from Makefile Tomi Valkeinen @ 2016-03-03 14:01 ` Tomi Valkeinen 2016-03-03 14:01 ` [PATCH 3/3] drm/omap: no need to select OMAP2_DSS Tomi Valkeinen 2 siblings, 0 replies; 8+ messages in thread From: Tomi Valkeinen @ 2016-03-03 14:01 UTC (permalink / raw) To: dri-devel, Laurent Pinchart; +Cc: Tomi Valkeinen From: Laurent Pinchart <laurent.pinchart@ideasonboard.com> When an error occurs in omap_gem_new() the function calls omap_gem_free_object() to clean up. However, that function expects to be called on a fully initialized GEM object and thus crashes. Replace it by manual cleanup. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- drivers/gpu/drm/omapdrm/omap_gem.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index 9ac30560e9b1..cc36a8dc9bd4 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -1398,35 +1398,37 @@ struct drm_gem_object *omap_gem_new(struct drm_device *dev, size = PAGE_ALIGN(gsize.bytes); } - spin_lock(&priv->list_lock); - list_add(&omap_obj->mm_list, &priv->obj_list); - spin_unlock(&priv->list_lock); - - /* Allocate memory if needed. */ - if (flags & OMAP_BO_MEM_DMA_API) { - omap_obj->vaddr = dma_alloc_writecombine(dev->dev, size, - &omap_obj->paddr, - GFP_KERNEL); - if (!omap_obj->vaddr) - goto fail; - } - /* Initialize the GEM object. */ if (!(flags & OMAP_BO_MEM_SHMEM)) { drm_gem_private_object_init(dev, obj, size); } else { ret = drm_gem_object_init(dev, obj, size); if (ret) - goto fail; + goto err_free; mapping = file_inode(obj->filp)->i_mapping; mapping_set_gfp_mask(mapping, GFP_USER | __GFP_DMA32); } + /* Allocate memory if needed. */ + if (flags & OMAP_BO_MEM_DMA_API) { + omap_obj->vaddr = dma_alloc_writecombine(dev->dev, size, + &omap_obj->paddr, + GFP_KERNEL); + if (!omap_obj->vaddr) + goto err_release; + } + + spin_lock(&priv->list_lock); + list_add(&omap_obj->mm_list, &priv->obj_list); + spin_unlock(&priv->list_lock); + return obj; -fail: - omap_gem_free_object(obj); +err_release: + drm_gem_object_release(obj); +err_free: + kfree(omap_obj); return NULL; } -- 2.5.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/3] drm/omap: no need to select OMAP2_DSS 2016-03-03 14:01 [PATCH 0/3] drm/omap: patches for v4.6 part 3 Tomi Valkeinen 2016-03-03 14:01 ` [PATCH 1/3] drm/omap: remove -Werror from Makefile Tomi Valkeinen 2016-03-03 14:01 ` [PATCH 2/3] drm/omap: gem: Fix omap_gem_new() error path Tomi Valkeinen @ 2016-03-03 14:01 ` Tomi Valkeinen 2016-03-06 15:24 ` Laurent Pinchart 2 siblings, 1 reply; 8+ messages in thread From: Tomi Valkeinen @ 2016-03-03 14:01 UTC (permalink / raw) To: dri-devel, Laurent Pinchart; +Cc: Tomi Valkeinen omapdss driver now depends on omapdrm, so we no longer should select OMAP2_DSS from omapdrm's Kconfig. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- drivers/gpu/drm/omapdrm/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/Kconfig b/drivers/gpu/drm/omapdrm/Kconfig index 336ad4de9981..73241c4eb7aa 100644 --- a/drivers/gpu/drm/omapdrm/Kconfig +++ b/drivers/gpu/drm/omapdrm/Kconfig @@ -2,7 +2,6 @@ config DRM_OMAP tristate "OMAP DRM" depends on DRM depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM - select OMAP2_DSS select DRM_KMS_HELPER select DRM_KMS_FB_HELPER select FB_SYS_FILLRECT -- 2.5.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] drm/omap: no need to select OMAP2_DSS 2016-03-03 14:01 ` [PATCH 3/3] drm/omap: no need to select OMAP2_DSS Tomi Valkeinen @ 2016-03-06 15:24 ` Laurent Pinchart 0 siblings, 0 replies; 8+ messages in thread From: Laurent Pinchart @ 2016-03-06 15:24 UTC (permalink / raw) To: Tomi Valkeinen; +Cc: dri-devel Hi Tomi, Thank you for the patch. On Thursday 03 March 2016 16:01:18 Tomi Valkeinen wrote: > omapdss driver now depends on omapdrm, so we no longer should select > OMAP2_DSS from omapdrm's Kconfig. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/gpu/drm/omapdrm/Kconfig | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/gpu/drm/omapdrm/Kconfig > b/drivers/gpu/drm/omapdrm/Kconfig index 336ad4de9981..73241c4eb7aa 100644 > --- a/drivers/gpu/drm/omapdrm/Kconfig > +++ b/drivers/gpu/drm/omapdrm/Kconfig > @@ -2,7 +2,6 @@ config DRM_OMAP > tristate "OMAP DRM" > depends on DRM > depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM > - select OMAP2_DSS > select DRM_KMS_HELPER > select DRM_KMS_FB_HELPER > select FB_SYS_FILLRECT -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-03-06 15:24 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-03 14:01 [PATCH 0/3] drm/omap: patches for v4.6 part 3 Tomi Valkeinen 2016-03-03 14:01 ` [PATCH 1/3] drm/omap: remove -Werror from Makefile Tomi Valkeinen 2016-03-03 18:44 ` Laurent Pinchart 2016-03-03 18:54 ` Tomi Valkeinen 2016-03-06 15:22 ` Laurent Pinchart 2016-03-03 14:01 ` [PATCH 2/3] drm/omap: gem: Fix omap_gem_new() error path Tomi Valkeinen 2016-03-03 14:01 ` [PATCH 3/3] drm/omap: no need to select OMAP2_DSS Tomi Valkeinen 2016-03-06 15:24 ` Laurent Pinchart
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.