From: Archit Taneja <architt@codeaurora.org>
To: Rob Clark <robdclark@gmail.com>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
linux-arm-msm <linux-arm-msm@vger.kernel.org>
Subject: Re: [PATCH 6/6] drm/msm/adreno: Remove CONFIG_OF checks
Date: Wed, 18 Nov 2015 21:34:58 +0530 [thread overview]
Message-ID: <564CA1AA.6050702@codeaurora.org> (raw)
In-Reply-To: <CAF6AEGtJjWbnFEf_ZNmVPw=9OEsGo6TgLoG+yiu1zg---t=vUg@mail.gmail.com>
On 11/18/2015 8:15 PM, Rob Clark wrote:
> On Wed, Nov 18, 2015 at 6:19 AM, Archit Taneja <architt@codeaurora.org> wrote:
>> Remove CONFIG_OF checks in adreno_device.c. The downstream bus scaling
>> stuff is included only when CONFIG_OF is not set. So, remove that too.
>>
>> Signed-off-by: Archit Taneja <architt@codeaurora.org>
>> ---
>> drivers/gpu/drm/msm/adreno/adreno_device.c | 52 ------------------------------
>> 1 file changed, 52 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
>> index 1ea2df5..950d27d 100644
>> --- a/drivers/gpu/drm/msm/adreno/adreno_device.c
>> +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
>> @@ -19,10 +19,6 @@
>>
>> #include "adreno_gpu.h"
>>
>> -#if defined(DOWNSTREAM_CONFIG_MSM_BUS_SCALING) && !defined(CONFIG_OF)
>> -# include <mach/kgsl.h>
>> -#endif
>> -
>
> I think we do need to keep the bus-scaling for 3.10 kernel, esp. for
> the display (otherwise underflow).. but the 'pdata->bus_scale_table'
> stuff can be dropped since somehow that is unneeded. (I guess
> downstream bus scaling gets that from DT? I didn't really look into
> how it worked.)
Okay. It looks like the AHB bus scale tables are hardcoded within the
driver and the AXI ones are retrieved from the mdp/gpu DT nodes.
>
> Eventually when we have real bus scaling upstream, hopefully we can
> hack up some sort of shim for downstream kernel so the same drm/msm
> code can also work downstream, but we'll have to see what the upstream
> bus scaling API looks like.
The adreno driver isn't using the bus scale table at all when DT is
enabled. There are some downstream bus scale API helpers that let us
get the table from DT. I guess we could put that under the BUS_SCALING
macro.
Is this particular patch okay as is? The bus scale stuff affected is
needed only by the3.4 kernel stuff anyway.
Archit
>
> BR,
> -R
>
>> #define ANY_ID 0xff
>>
>> bool hang_debug = false;
>> @@ -168,7 +164,6 @@ static void set_gpu_pdev(struct drm_device *dev,
>> static int adreno_bind(struct device *dev, struct device *master, void *data)
>> {
>> static struct adreno_platform_config config = {};
>> -#ifdef CONFIG_OF
>> struct device_node *child, *node = dev->of_node;
>> u32 val;
>> int ret;
>> @@ -205,53 +200,6 @@ static int adreno_bind(struct device *dev, struct device *master, void *data)
>> return -ENXIO;
>> }
>>
>> -#else
>> - struct kgsl_device_platform_data *pdata = dev->platform_data;
>> - uint32_t version = socinfo_get_version();
>> - if (cpu_is_apq8064ab()) {
>> - config.fast_rate = 450000000;
>> - config.slow_rate = 27000000;
>> - config.bus_freq = 4;
>> - config.rev = ADRENO_REV(3, 2, 1, 0);
>> - } else if (cpu_is_apq8064()) {
>> - config.fast_rate = 400000000;
>> - config.slow_rate = 27000000;
>> - config.bus_freq = 4;
>> -
>> - if (SOCINFO_VERSION_MAJOR(version) == 2)
>> - config.rev = ADRENO_REV(3, 2, 0, 2);
>> - else if ((SOCINFO_VERSION_MAJOR(version) == 1) &&
>> - (SOCINFO_VERSION_MINOR(version) == 1))
>> - config.rev = ADRENO_REV(3, 2, 0, 1);
>> - else
>> - config.rev = ADRENO_REV(3, 2, 0, 0);
>> -
>> - } else if (cpu_is_msm8960ab()) {
>> - config.fast_rate = 400000000;
>> - config.slow_rate = 320000000;
>> - config.bus_freq = 4;
>> -
>> - if (SOCINFO_VERSION_MINOR(version) == 0)
>> - config.rev = ADRENO_REV(3, 2, 1, 0);
>> - else
>> - config.rev = ADRENO_REV(3, 2, 1, 1);
>> -
>> - } else if (cpu_is_msm8930()) {
>> - config.fast_rate = 400000000;
>> - config.slow_rate = 27000000;
>> - config.bus_freq = 3;
>> -
>> - if ((SOCINFO_VERSION_MAJOR(version) == 1) &&
>> - (SOCINFO_VERSION_MINOR(version) == 2))
>> - config.rev = ADRENO_REV(3, 0, 5, 2);
>> - else
>> - config.rev = ADRENO_REV(3, 0, 5, 0);
>> -
>> - }
>> -# ifdef DOWNSTREAM_CONFIG_MSM_BUS_SCALING
>> - config.bus_scale_table = pdata->bus_scale_table;
>> -# endif
>> -#endif
>> dev->platform_data = &config;
>> set_gpu_pdev(dev_get_drvdata(master), to_platform_device(dev));
>> return 0;
>> --
>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
>> hosted by The Linux Foundation
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2015-11-18 16:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 11:19 [PATCH 0/6] drm/msm: Work only with DT supported kernels Archit Taneja
2015-11-18 11:19 ` [PATCH 1/6] drm/msm: Remove non-DT code in msm_drv Archit Taneja
2015-11-18 11:19 ` [PATCH 2/6] drm/msm: Update compatible strings for mdp Archit Taneja
2015-11-18 11:19 ` [PATCH 3/6] dt-bindings: drm/msm: Update MDP bindings Archit Taneja
2015-11-18 15:26 ` Archit Taneja
2015-11-18 11:19 ` [PATCH 4/6] drm/msm/mdp: Remove CONFIG_OF checks from MDP drivers Archit Taneja
2015-11-18 11:19 ` [PATCH 5/6] drm/msm/hdmi: remove CONFIG_OF checks Archit Taneja
2015-11-18 11:19 ` [PATCH 6/6] drm/msm/adreno: Remove " Archit Taneja
2015-11-18 14:45 ` Rob Clark
2015-11-18 16:04 ` Archit Taneja [this message]
2015-11-18 20:29 ` Rob Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=564CA1AA.6050702@codeaurora.org \
--to=architt@codeaurora.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=robdclark@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox