From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752425AbcFVBrP (ORCPT ); Tue, 21 Jun 2016 21:47:15 -0400 Received: from ozlabs.org ([103.22.144.67]:52111 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752393AbcFVBrL (ORCPT ); Tue, 21 Jun 2016 21:47:11 -0400 Date: Wed, 22 Jun 2016 11:47:04 +1000 From: Stephen Rothwell To: Daniel Vetter , , , Russell King Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: linux-next: manual merge of the drm-misc tree with the arm tree Message-ID: <20160622114704.5b0c97eb@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, Today's linux-next merge of the drm-misc tree got a conflict in: drivers/gpu/drm/sti/sti_drv.c between commit: 062993b15e8e ("drm: convert DT component matching to component_match_add_release()") from the arm tree and commit: 84601dbdea36 ("drm: sti: rework init sequence") from the drm-misc tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. -- Cheers, Stephen Rothwell diff --cc drivers/gpu/drm/sti/sti_drv.c index 8abb57a94651,96bd3d08b2d4..000000000000 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@@ -340,14 -320,79 +320,84 @@@ static int compare_of(struct device *de return dev->of_node == data; } +static void release_of(struct device *dev, void *data) +{ + of_node_put(data); +} + + static int sti_init(struct drm_device *ddev) + { + struct sti_private *private; + + private = kzalloc(sizeof(*private), GFP_KERNEL); + if (!private) + return -ENOMEM; + + ddev->dev_private = (void *)private; + dev_set_drvdata(ddev->dev, ddev); + private->drm_dev = ddev; + + mutex_init(&private->commit.lock); + INIT_WORK(&private->commit.work, sti_atomic_work); + + drm_mode_config_init(ddev); + + sti_mode_config_init(ddev); + + drm_kms_helper_poll_init(ddev); + + return 0; + } + + static void sti_cleanup(struct drm_device *ddev) + { + struct sti_private *private = ddev->dev_private; + + if (private->fbdev) { + drm_fbdev_cma_fini(private->fbdev); + private->fbdev = NULL; + } + + drm_kms_helper_poll_fini(ddev); + drm_vblank_cleanup(ddev); + kfree(private); + ddev->dev_private = NULL; + } + static int sti_bind(struct device *dev) { - return drm_platform_init(&sti_driver, to_platform_device(dev)); + struct drm_device *ddev; + int ret; + + ddev = drm_dev_alloc(&sti_driver, dev); + if (!ddev) + return -ENOMEM; + + ddev->platformdev = to_platform_device(dev); + + ret = sti_init(ddev); + if (ret) + goto err_drm_dev_unref; + + ret = component_bind_all(ddev->dev, ddev); + if (ret) + goto err_cleanup; + + ret = drm_dev_register(ddev, 0); + if (ret) + goto err_register; + + drm_mode_config_reset(ddev); + + return 0; + + err_register: + drm_mode_config_cleanup(ddev); + err_cleanup: + sti_cleanup(ddev); + err_drm_dev_unref: + drm_dev_unref(ddev); + return ret; } static void sti_unbind(struct device *dev)