All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vikas Patil <vikasmpatil@gmail.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [ADV7393] DRM Encoder Slave or DRM Bridge
Date: Thu, 22 Sep 2016 18:52:53 +0530	[thread overview]
Message-ID: <CA+kt3u03XT9oTkP7CCn+_kwqOMxQy5aqsAGOr7LS_GA=mGqRVQ@mail.gmail.com> (raw)
In-Reply-To: <406769ce-bbd0-c517-3006-c5f1ab6ff511@ti.com>

Hi Tomi,


Now with the adv7393 driver in place, I was getting following error.
After debugging found out that this is due to the “.interlace= true”
in display timings
“drivers\gpu\drm\omapdrm\displays\connector-analog-tv.c”.


[   14.564872] [drm:drm_helper_probe_single_connector_modes_merge_bits]
[CONNECTOR:32:Unknown-1]
[   14.564882] [drm:omap_connector_get_modes] cvbs_out
[   14.564898] ------>adv7393_check_timings: start
[   14.569646] [drm:omap_connector_mode_valid] connector: mode
invalid: 45:"720x480i" 120 27000 720 739 801 858 480 490 493 527 0x48
0x2a000015
[   14.569659] [drm:drm_mode_debug_printmodeline] Modeline
45:"720x480i" 120 27000 720 739 801 858 480 490 493 527 0x48
0x2a000015
[   14.569668] [drm:drm_mode_prune_invalid] Not using 720x480i mode: BAD

After setting “.interlace= false”  in display timings
“\displays\connector-analog-tv.c” mode seems to be valid but still
nothing on display probably because connector still doesn’t seem to be
enabled from the below drm log.

[   14.787200] [drm:drm_setup_crtcs]
[   14.787211] [drm:drm_enable_connectors] connector 32 enabled? no
[   14.787220] [drm:drm_enable_connectors] connector 36 enabled? Yes

Could you help me to understand if I could use “interlace=false”?
ADV7393 seems to be supporting non-interlaced mode. From datasheet:
“The ADV7390/ADV7391/ADV7392/ADV7393 support an SD noninterlaced mode.
Using this mode, progressive inputs at twice the frame rate of NTSC
and PAL (240p/59.94 Hz and 288p/50 Hz, respectively) can be input into
the ADV7390/ ADV7391/ADV7392/ADV7393. The SD noninterlaced mode can be
enabled using Subaddress 0x88, Bit 1.”

What/Where should I need to look for enabling the above connector and
attached to the correct encoder/crtc?

Also looking at function dispc_mgr_timings_ok () in
drivers/gpu/drm/omapdrm/dss/dispc.c, it seems driver of DSS doesn’t
support interlace out as comment suggests below. Would this be a
problem for me for driving ADV7393? What does this means?


if (dss_mgr_is_lcd(channel)) {
                /* TODO: OMAP4+ supports interlace for LCD outputs */
                if (timings->interlace)
                {
                        DSSWARN("vikas----->: interlace failed\n");
                        return false;
                }

                if (!_dispc_lcd_timings_ok(timings->hsw, timings->hfp,
                                timings->hbp, timings->vsw, timings->vfp,
                               timings->vbp))
                {
                        return false;
                }
        }


Thanks & Regards,
Vikash



On Thu, Sep 15, 2016 at 3:23 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>
>
> On 15/09/16 12:44, Vikas Patil wrote:
>> On Wed, Sep 14, 2016 at 3:04 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>>>
>>>
>>> On 13/09/16 16:13, Vikas Patil wrote:
>>>> Thanks Tomi for quick comment.
>>>>
>>>> I am thinking to base adv7393 driver on
>>>> "drivers\gpu\drm\omapdrm\displays\encoder-tc358768.c" as I don't think
>>>> any similar to adv7393 chip driver available. Could you please comment
>>>> if this will help to get adv chip running?
>>>
>>> I presume you're not using mainline kernel, as that driver is not there.
>>> I'm not familiar with adv7393, but yes, I think you can use that as an
>>> example.
>>>
>>
>> Thanks a lot for your comments. I am using latest (i.e. 3.00.00.03 )
>> Processor SDK Linux Automotive which is based on linux 4.4.14.
>>
>> As my display panel is connected as follows. I am little confused over
>> the values I need to set for following properties in probe function.
>>
>> DPI1/VOUT1 -----16bit DRGB---> ADV7393 (Digital to Analog video
>> encoder) ------> CVBS Out ------> Display Panel
>>
>>
>>      dssdev->ops.dpi = &adv7393_dpi_ops; (atv?)
>>     dssdev->type = OMAP_DISPLAY_TYPE_DPI;
>>     dssdev->output_type = OMAP_DISPLAY_TYPE_DPI; (Do I need to use
>> OMAP_DISPLAY_TYPE_VENC, but DRA74x do not have VENC Encoder I think)
>>     dssdev->phy.dpi.data_lines = ddata->dpi_ndl;
>>     dssdev->port_num = 1;
>>
>>
>> As adv7393 takes 16-bit DRGB as input and gives composite as output,
>> does above configuration looks correct? or Do I need to change to
>> something else (e.g. dpi,sdi,dvi, hdmi, atv, dsi)?
>
> The API is quite messy (full of legacy)...
>
> But the "ops" there are for the "downstream" direction, i.e. towards the
> connector. So here you should have atv ops. You should then have
> connector-analog-tv as a device after adv7393, and that connector driver
> will be calling those atv ops.
>
> adv7393 itself will be calling dpi ops, offered by the DSS.
>
> You should set dssdev->type to DPI (that's the input).
> dssdev->output_type to OMAP_DISPLAY_TYPE_VENC (output, although "venc"
> is not quite correct here, but closest match we have). DRA74x doesn't
> have VENC, but this is what the adv7393 outputs.
>
>  Tomi
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-09-22 13:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 12:29 [ADV7393] DRM Encoder Slave or DRM Bridge Vikas Patil
2016-09-13  8:47 ` Vikas Patil
2016-09-13  8:57   ` Tomi Valkeinen
2016-09-13 13:13     ` Vikas Patil
2016-09-14  9:34       ` Tomi Valkeinen
2016-09-15  9:44         ` Vikas Patil
2016-09-15  9:53           ` Tomi Valkeinen
2016-09-21 10:59             ` Vikas Patil
2016-09-22 13:22             ` Vikas Patil [this message]
2016-09-23 10:08               ` Vikas Patil
2016-09-23 11:02                 ` Tomi Valkeinen
2016-09-26  6:57                   ` Vikas Patil
2016-09-26 11:55                     ` Tomi Valkeinen
2016-09-23 11:00               ` Tomi Valkeinen
2016-09-26 12:25                 ` Vikas Patil
2016-09-26 12:30                   ` Tomi Valkeinen
2016-09-26 12:34                     ` Vikas Patil
2016-09-26 12:41                       ` Tomi Valkeinen
2016-09-26 12:46                         ` Vikas Patil
2016-09-18 10:15 ` Laurent Pinchart
2019-05-27 11:21 ` Nasser
2019-05-27  1:07 nasser afshin
2019-05-27  6:19 ` Daniel Vetter
2019-05-27  7:19 ` Vikas Patil

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='CA+kt3u03XT9oTkP7CCn+_kwqOMxQy5aqsAGOr7LS_GA=mGqRVQ@mail.gmail.com' \
    --to=vikasmpatil@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=tomi.valkeinen@ti.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 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.