From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Brugger Subject: Re: [PATCH v2 17/25] drm/msm/mdp5: Update compatible strings for MDSS/MDP5 Date: Mon, 11 Jul 2016 10:39:38 +0200 Message-ID: <57835B4A.7030206@suse.com> References: <1466077007-26792-1-git-send-email-architt@codeaurora.org> <1466691210-22779-1-git-send-email-architt@codeaurora.org> <1466691210-22779-18-git-send-email-architt@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from smtp.nue.novell.com ([195.135.221.5]:46724 "EHLO smtp.nue.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753159AbcGKIkE (ORCPT ); Mon, 11 Jul 2016 04:40:04 -0400 In-Reply-To: <1466691210-22779-18-git-send-email-architt@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Archit Taneja , robdclark@gmail.com Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org On 23/06/16 16:13, Archit Taneja wrote: > Introduce new compatible strings for the top level MDSS wrapper device, > and the MDP5 device. > > Previously, the "qcom,mdp5" and "qcom,mdss_mdp" compatible strings > were used to match the top level platform_device (which was also tied > to the top level drm_device struct). Now, these strings are used > to match the MDP5 platform device. > > Use "qcom,mdss" as the compatible string for top level MDSS device. > This is now used to match the top level platform_device (which is > tied to the drm_device struct). > > Signed-off-by: Archit Taneja > --- > drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c | 10 +++++++++- > drivers/gpu/drm/msm/msm_drv.c | 6 ++---- > 2 files changed, 11 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c > index 174d7e7..a2bd6a4 100644 > --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c > +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c > @@ -809,12 +809,20 @@ static int mdp5_dev_remove(struct platform_device *pdev) > return 0; > } > > +static const struct of_device_id dt_match[] = { > + { .compatible = "qcom,mdp5", }, > + /* to support downstream DT files */ > + { .compatible = "qcom,mdss_mdp", }, > + {} > +}; > +MODULE_DEVICE_TABLE(of, dt_match); > + > static struct platform_driver mdp5_driver = { > .probe = mdp5_dev_probe, > .remove = mdp5_dev_remove, > .driver = { > .name = "msm_mdp", > - /* Add a DT match field once we move to new hierarchy */ > + .of_match_table = dt_match, > }, > }; > > diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c > index be8f73a..f133dd5 100644 > --- a/drivers/gpu/drm/msm/msm_drv.c > +++ b/drivers/gpu/drm/msm/msm_drv.c > @@ -992,10 +992,8 @@ static int msm_pdev_remove(struct platform_device *pdev) > } > > static const struct of_device_id dt_match[] = { > - { .compatible = "qcom,mdp4", .data = (void *) 4 }, /* mdp4 */ > - { .compatible = "qcom,mdp5", .data = (void *) 5 }, /* mdp5 */ > - /* to support downstream DT files */ > - { .compatible = "qcom,mdss_mdp", .data = (void *) 5 }, /* mdp5 */ > + { .compatible = "qcom,mdp4", .data = (void *)4 }, /* MDP4 */ > + { .compatible = "qcom,mdss", .data = (void *)5 }, /* MDP5 MDSS */ This seems to break linux-next: [ 3945s] CC [M] drivers/gpu/drm/nouveau/nvkm/core/ioctl.o [ 3947s] LD [M] drivers/gpu/drm/msm/msm.o [ 3947s] drivers/gpu/drm/msm/msm_drv.o:(.rodata+0x300): multiple definition of `__mod_of__dt_match_device_table' [ 3947s] drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.o:(.rodata+0x1b0): first defined here [ 3947s] make[6]: *** [../scripts/Makefile.build:427: drivers/gpu/drm/msm/msm.o] Error 1 [ 3947s] make[5]: *** [../scripts/Makefile.build:440: drivers/gpu/drm/msm] Error 2 [ 3947s] make[5]: *** Waiting for unfinished jobs.... Reverting commit b71a717c955a ("drm/msm/mdp5: Update compatible strings for MDSS/MDP5") fixes the compilation error. Regards, Matthias