From: patrik.r.jakobsson@gmail.com
To: nick <xerofoify@gmail.com>
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>,
David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
sonika.jindal@intel.com, Dave Airlie <airlied@gmail.com>,
Alan Cox <alan@linux.intel.com>,
thomas.wood@intel.com,
dri-devel <dri-devel@lists.freedesktop.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gma500:Remove functions that are now deprecated and move to the newer functions in drm_dp_helper.c
Date: Sun, 10 May 2015 19:04:35 +0200 [thread overview]
Message-ID: <20150510170435.GA3108@patrik-arch.example2.org> (raw)
In-Reply-To: <5548DEF3.5040204@gmail.com>
On Tue, May 05, 2015 at 11:17:07AM -0400, nick wrote:
>
>
> On 2015-05-05 09:06 AM, Patrik Jakobsson wrote:
> > On Tue, May 5, 2015 at 12:29 AM, Nicholas Krause <xerofoify@gmail.com> wrote:
> >> This removes the deprecated functions,i2c_dp_aux_add_bus and
> >> i2c_dp_aux_prepare_bus and the only call in the function,
> >> cdv_intel_dp_i2c_init to i2c_dp_aux_add_bus respectfully.
> >> The call and use of these functions is now replaced alongside
> >> the removal of setting other values in the function,cdv_intel_dp_i2c_init
> >> to use the helper function, drm_dp_aux_register that can handle all this
> >> work internally.
> >
> > You need to fill in the drm_dp_aux structure and implement a proper transfer
> > function. This patch would only break things. But the cdv dp output is already
> > broken on my system so it needs fixing first.
> >
> > -Patrik
> >
> Patrik,
> Due to me not being an expert in this area of the kernel I based my work off the similar function,
> intel_dp_aux_init for i915. I was unsure of which helper functions for i915 need to be written
> differently for gma500 based solutions as I don't known the differences between these two in the
> graphics specs area.
> Thanks,
> Nick
Hi Nick
You are _required_ to know what your patches are doing before sending them. If
you don't test your code and don't know what it's doing then we will not accept
it. You're expected to read the available documentation and relevant literature
before sending patches and asking questions. Otherwise someone else is doing the
work for you, which I assume is not the purpose of you patch submission.
Thanks
Patrik
> >> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> >> ---
> >> drivers/gpu/drm/gma500/cdv_intel_dp.c | 42 ++---------------------------------
> >> 1 file changed, 2 insertions(+), 40 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c b/drivers/gpu/drm/gma500/cdv_intel_dp.c
> >> index 0fafb8e..c8c20fc 100644
> >> --- a/drivers/gpu/drm/gma500/cdv_intel_dp.c
> >> +++ b/drivers/gpu/drm/gma500/cdv_intel_dp.c
> >> @@ -200,38 +200,6 @@ static const struct i2c_algorithm i2c_dp_aux_algo = {
> >> .functionality = i2c_algo_dp_aux_functionality,
> >> };
> >>
> >> -static void
> >> -i2c_dp_aux_reset_bus(struct i2c_adapter *adapter)
> >> -{
> >> - (void) i2c_algo_dp_aux_address(adapter, 0, false);
> >> - (void) i2c_algo_dp_aux_stop(adapter, false);
> >> -}
> >> -
> >> -static int
> >> -i2c_dp_aux_prepare_bus(struct i2c_adapter *adapter)
> >> -{
> >> - adapter->algo = &i2c_dp_aux_algo;
> >> - adapter->retries = 3;
> >> - i2c_dp_aux_reset_bus(adapter);
> >> - return 0;
> >> -}
> >> -
> >> -/*
> >> - * FIXME: This is the old dp aux helper, gma500 is the last driver that needs to
> >> - * be ported over to the new helper code in drm_dp_helper.c like i915 or radeon.
> >> - */
> >> -static int __deprecated
> >> -i2c_dp_aux_add_bus(struct i2c_adapter *adapter)
> >> -{
> >> - int error;
> >> -
> >> - error = i2c_dp_aux_prepare_bus(adapter);
> >> - if (error)
> >> - return error;
> >> - error = i2c_add_adapter(adapter);
> >> - return error;
> >> -}
> >> -
> >> #define _wait_for(COND, MS, W) ({ \
> >> unsigned long timeout__ = jiffies + msecs_to_jiffies(MS); \
> >> int ret__ = 0; \
> >> @@ -275,6 +243,7 @@ struct cdv_intel_dp {
> >> int backlight_on_delay;
> >> int backlight_off_delay;
> >> struct drm_display_mode *panel_fixed_mode; /* for eDP */
> >> + struct drm_dp_aux aux;
> >> bool panel_on;
> >> };
> >>
> >> @@ -855,18 +824,11 @@ cdv_intel_dp_i2c_init(struct gma_connector *connector,
> >> intel_dp->algo.running = false;
> >> intel_dp->algo.address = 0;
> >> intel_dp->algo.aux_ch = cdv_intel_dp_i2c_aux_ch;
> >> -
> >> memset(&intel_dp->adapter, '\0', sizeof (intel_dp->adapter));
> >> - intel_dp->adapter.owner = THIS_MODULE;
> >> - intel_dp->adapter.class = I2C_CLASS_DDC;
> >> - strncpy (intel_dp->adapter.name, name, sizeof(intel_dp->adapter.name) - 1);
> >> - intel_dp->adapter.name[sizeof(intel_dp->adapter.name) - 1] = '\0';
> >> - intel_dp->adapter.algo_data = &intel_dp->algo;
> >> - intel_dp->adapter.dev.parent = connector->base.kdev;
> >>
> >> if (is_edp(encoder))
> >> cdv_intel_edp_panel_vdd_on(encoder);
> >> - ret = i2c_dp_aux_add_bus(&intel_dp->adapter);
> >> + ret = drm_dp_aux_register(&intel_dp->aux);
> >> if (is_edp(encoder))
> >> cdv_intel_edp_panel_vdd_off(encoder);
> >>
> >> --
> >> 2.1.4
> >>
next prev parent reply other threads:[~2015-05-10 17:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1430778546-23468-1-git-send-email-xerofoify@gmail.com>
2015-05-05 12:02 ` [PATCH] gma500:Remove functions that are now deprecated and move to the newer functions in drm_dp_helper.c Alan Cox
2015-05-05 13:06 ` Patrik Jakobsson
[not found] ` <5548DEF3.5040204@gmail.com>
2015-05-10 17:04 ` patrik.r.jakobsson [this message]
[not found] ` <554F99DE.3020608@gmail.com>
2015-05-10 18:35 ` patrik.r.jakobsson
[not found] ` <554FA628.6030102@gmail.com>
2015-05-10 19:45 ` patrik.r.jakobsson
[not found] ` <DB132CE8-324F-4256-A6B9-0A331819DA3C@gmail.com>
2015-05-11 8:24 ` Patrik Jakobsson
[not found] ` <72A3DCA4-2BA0-41ED-8313-985B49FD15E3@gmail.com>
2015-05-12 14:18 ` Patrik Jakobsson
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=20150510170435.GA3108@patrik-arch.example2.org \
--to=patrik.r.jakobsson@gmail.com \
--cc=airlied@gmail.com \
--cc=airlied@linux.ie \
--cc=alan@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sonika.jindal@intel.com \
--cc=thomas.wood@intel.com \
--cc=xerofoify@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