lkml.org 
[lkml]   [2012]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC v2 1/8] video: tegra: Add nvhost driver
    On 12/04/2012 05:03 AM, Thierry Reding wrote:
    [...]
    >
    > One other thing that such a design can help with is refactoring common
    > code or parameterizing code. Maybe newer generations are not compatible
    > but can easily be made to work with existing code by introducing a
    > variable such as register stride or something.
    >
    > What's really difficult to follow is if an ops structure is accessed via
    > some global macro. It also breaks encapsulation because you have a
    > global ops structure. That may even work fine for now, but it will break
    > once you have more than a single host1x in a system. I know this will
    > never happen, but all of a sudden it happens anyway and the code breaks.
    > Doing this right isn't very hard and it will lead to a better design and
    > is less likely to break at some point.
    >

    Sorry I forget to reply this in last mail...

    Agree. Even for userspace programs, we should avoid using global
    variables as possible as we can. So we need to think about this and try
    to reduce the number of global vars.

    Mark
    > Thierry
    >
    >
    >
    > _______________________________________________
    > dri-devel mailing list
    > dri-devel@lists.freedesktop.org
    > http://lists.freedesktop.org/mailman/listinfo/dri-devel
    >


    \
     
     \ /
      Last update: 2012-12-04 04:01    [W:3.249 / U:0.108 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site